mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
mdns: check all mallocs for failure and add default hook to log error with free heap
solves crash about _mdns_result_txt_create when stress test * Original commit: espressif/esp-idf@c8cb4cd3c8
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
b4e57424f9
commit
7a4fdad16d
@ -118,6 +118,9 @@
|
||||
#define MDNS_SEARCH_LOCK() xSemaphoreTake(_mdns_server->search.lock, portMAX_DELAY)
|
||||
#define MDNS_SEARCH_UNLOCK() xSemaphoreGive(_mdns_server->search.lock)
|
||||
|
||||
#ifndef HOOK_MALLOC_FAILED
|
||||
#define HOOK_MALLOC_FAILED ESP_LOGE(TAG, "Cannot allocate memory (line: %d, free heap: %d bytes)", __LINE__, esp_get_free_heap_size());
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
PCB_OFF, PCB_DUP, PCB_INIT,
|
||||
|
Reference in New Issue
Block a user