mdns: fixed crashes on network change (not properly locked sending packets to queue from timer task), backport 3.1
This commit is contained in:
parent
3f64b39ad5
commit
6a6fccc191
1 changed files with 2 additions and 1 deletions
|
@ -3779,13 +3779,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) {
|
||||
|
|
Loading…
Reference in a new issue