fix(mdns): Schedule all queued Tx packets from timer task

Co-Authored-By: not-my-real-name <none@interent.com>

Partially addresses: https://github.com/espressif/esp-idf/issues/13333
This commit is contained in:
David Cermak
2024-03-20 11:40:11 +01:00
parent 963b32e7b4
commit d4e693e392

View File

@ -5191,7 +5191,7 @@ static void _mdns_scheduler_run(void)
MDNS_SERVICE_UNLOCK(); MDNS_SERVICE_UNLOCK();
return; return;
} }
if ((int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) { while (p && (int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
action = (mdns_action_t *)malloc(sizeof(mdns_action_t)); action = (mdns_action_t *)malloc(sizeof(mdns_action_t));
if (action) { if (action) {
action->type = ACTION_TX_HANDLE; action->type = ACTION_TX_HANDLE;
@ -5203,8 +5203,10 @@ static void _mdns_scheduler_run(void)
} }
} else { } else {
HOOK_MALLOC_FAILED; HOOK_MALLOC_FAILED;
// continue break;
} }
//Find the next unqued packet
p = p->next;
} }
MDNS_SERVICE_UNLOCK(); MDNS_SERVICE_UNLOCK();
} }