Merge branch 'bugfix/mdns_deinit_event_crash_v4.0' into 'release/v4.0'
mdns: fixed crash on event during deinit (v4.0) See merge request espressif/esp-idf!7246
This commit is contained in:
commit
dcd735759e
1 changed files with 5 additions and 3 deletions
|
@ -4249,6 +4249,11 @@ void mdns_free()
|
||||||
if (!_mdns_server) {
|
if (!_mdns_server) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
||||||
|
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
||||||
|
esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
||||||
|
|
||||||
mdns_service_remove_all(_mdns_server);
|
mdns_service_remove_all(_mdns_server);
|
||||||
_mdns_service_task_stop();
|
_mdns_service_task_stop();
|
||||||
for (i=0; i<TCPIP_ADAPTER_IF_MAX; i++) {
|
for (i=0; i<TCPIP_ADAPTER_IF_MAX; i++) {
|
||||||
|
@ -4279,9 +4284,6 @@ void mdns_free()
|
||||||
free(h);
|
free(h);
|
||||||
}
|
}
|
||||||
vSemaphoreDelete(_mdns_server->lock);
|
vSemaphoreDelete(_mdns_server->lock);
|
||||||
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
|
||||||
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
|
||||||
esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, &event_handler);
|
|
||||||
free(_mdns_server);
|
free(_mdns_server);
|
||||||
_mdns_server = NULL;
|
_mdns_server = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue