Skip to content

Commit 5b59fdc

Browse files
committed
Merge branch 'docs/update_translation_for_esp_netif' into 'master'
docs: Update translation for esp_netif Closes DOC-12459 See merge request espressif/esp-idf!42239
2 parents 3a0eba4 + dbb50ed commit 5b59fdc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/en/migration-guides/release-6.x/6.0/networking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Add driver component from `IDF Component Manager <https://components.espressif.c
7272
ESP-NETIF
7373
*********
7474

75-
Removal of deprecated :cpp:func:`esp_netif_next`
75+
Removed Deprecated :cpp:func:`esp_netif_next`
7676
------------------------------------------------
7777

7878
The deprecated iteration helper :cpp:func:`esp_netif_next` has been removed from :doc:`/api-reference/network/esp_netif`. This API was inherently unsafe because it did not lock the interface list or the TCP/IP context during iteration.

docs/zh_CN/migration-guides/release-6.x/6.0/networking.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ ESP-NETIF
7575
移除弃用的 :cpp:func:`esp_netif_next`
7676
-------------------------------------
7777

78-
已从 :doc:`/api-reference/network/esp_netif` 中移除弃用的迭代辅助函数 :cpp:func:`esp_netif_next`。该 API 在迭代过程中不会对接口列表或 TCP/IP 上下文进行加锁,因而并不安全
78+
已从 :doc:`/api-reference/network/esp_netif` 中移除弃用的迭代辅助函数 :cpp:func:`esp_netif_next`。该 API 本质上不安全,因为在迭代过程中它既不锁定接口列表,也不锁定 TCP/IP 上下文
7979

80-
请使用以下替代方案
80+
请使用以下替代方案之一
8181

82-
- 仅在完全可控的上下文中直接调用 :cpp:func:`esp_netif_next_unsafe`,或在 :cpp:func:`esp_netif_tcpip_exec` 中执行以保证在 TCP/IP 上下文内安全运行
83-
- 使用 :cpp:func:`esp_netif_find_if` 并配合谓词查找特定接口,从而避免手动迭代
82+
- 仅在完全控制的上下文中直接调用 :cpp:func:`esp_netif_next_unsafe`,或在 :cpp:func:`esp_netif_tcpip_exec` 函数内部调用该函数,以便在 TCP/IP 上下文中安全运行
83+
- 使用 :cpp:func:`esp_netif_find_if` 并配合谓词函数查找特定接口,无需手动迭代
8484

8585
迁移方式
8686
~~~~~~~~~
8787

88-
之前
88+
之前用法
8989

9090
.. code-block:: c
9191
@@ -94,7 +94,7 @@ ESP-NETIF
9494
// 使用 "it"
9595
}
9696
97-
之后(在可控上下文中进行不加锁迭代):
97+
之后用法(在受控上下文中非安全迭代):
9898

9999
.. code-block:: c
100100
@@ -103,7 +103,7 @@ ESP-NETIF
103103
// 使用 "it"
104104
}
105105
106-
推荐方式(在 TCP/IP 上下文中迭代):
106+
推荐用法(在 TCP/IP 上下文中迭代):
107107

108108
.. code-block:: c
109109
@@ -119,7 +119,7 @@ ESP-NETIF
119119
// 在 TCP/IP 上下文中安全执行迭代
120120
ESP_ERROR_CHECK(esp_netif_tcpip_exec(iterate_netifs, NULL));
121121
122-
替代方式(使用谓词查找):
122+
替代方案(使用谓词查找):
123123

124124
.. code-block:: c
125125

0 commit comments

Comments
 (0)