File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
examples/esp_netif/slip_custom_netif/components/slip_modem/library Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
2
+ * SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
@@ -109,7 +109,11 @@ static esp_netif_t *get_netif_with_esp_index(int index)
109
109
{
110
110
esp_netif_t * netif = NULL ;
111
111
int counter = 0 ;
112
+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL (5 , 2 , 0 )
113
+ while ((netif = esp_netif_next_unsafe (netif )) != NULL ) {
114
+ #else
112
115
while ((netif = esp_netif_next (netif )) != NULL ) {
116
+ #endif
113
117
if (counter == index ) {
114
118
return netif ;
115
119
}
@@ -124,7 +128,11 @@ static int get_esp_netif_index(esp_netif_t *esp_netif)
124
128
{
125
129
esp_netif_t * netif = NULL ;
126
130
int counter = 0 ;
131
+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL (5 , 2 , 0 )
132
+ while ((netif = esp_netif_next_unsafe (netif )) != NULL ) {
133
+ #else
127
134
while ((netif = esp_netif_next (netif )) != NULL ) {
135
+ #endif
128
136
if (esp_netif == netif ) {
129
137
return counter ;
130
138
}
You can’t perform that action at this time.
0 commit comments