kopia lustrzana https://github.com/espressif/esp-idf
esp_modem: Fixed modem netif deinit to clear IP events
Function esp_modem_netif_clear_default_handlers() didn't unregister event handlers from IP related events, so if the netif modem was reinitialized the previous handler was called with already destroyed esp_netif handle. Closes https://github.com/espressif/esp-idf/issues/6787pull/6882/head
rodzic
509afa839e
commit
7872057976
|
@ -144,6 +144,15 @@ esp_err_t esp_modem_netif_clear_default_handlers(void *h)
|
|||
if (ret != ESP_OK) {
|
||||
goto clear_event_failed;
|
||||
}
|
||||
ret = esp_event_handler_unregister(IP_EVENT, IP_EVENT_PPP_GOT_IP, esp_netif_action_connected);
|
||||
if (ret != ESP_OK) {
|
||||
goto clear_event_failed;
|
||||
}
|
||||
ret = esp_event_handler_unregister(IP_EVENT, IP_EVENT_PPP_LOST_IP, esp_netif_action_disconnected);
|
||||
if (ret != ESP_OK) {
|
||||
goto clear_event_failed;
|
||||
}
|
||||
|
||||
return ESP_OK;
|
||||
|
||||
clear_event_failed:
|
||||
|
|
Ładowanie…
Reference in New Issue