mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
mdns: fixed crashes on network changes
1) two events AP_STOP, AP_START shortly after each other may cause IGMP config on already stopped netif 2) not properly locked sending packets to queue from timer task closes #2580 * Original commit: espressif/esp-idf@097282a8e3
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
ea2300753e
commit
9b3b41c3f1
@ -3794,13 +3794,14 @@ static esp_err_t _mdns_send_search_action(mdns_action_type_t type, mdns_search_o
|
||||
*/
|
||||
static void _mdns_scheduler_run()
|
||||
{
|
||||
MDNS_SERVICE_LOCK();
|
||||
mdns_tx_packet_t * p = _mdns_server->tx_queue_head;
|
||||
mdns_action_t * action = NULL;
|
||||
|
||||
if (!p) {
|
||||
MDNS_SERVICE_UNLOCK();
|
||||
return;
|
||||
}
|
||||
MDNS_SERVICE_LOCK();
|
||||
if ((int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
|
||||
action = (mdns_action_t *)malloc(sizeof(mdns_action_t));
|
||||
if (action) {
|
||||
|
Reference in New Issue
Block a user