mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 12:37:01 +03:00
AirPlay: no realloc, safe TCB cleanup, tools convergence
This commit is contained in:
@@ -48,6 +48,16 @@ void winsock_init(void);
|
||||
void winsock_init(void);
|
||||
void winsock_close(void);
|
||||
|
||||
#else
|
||||
char *strlwr(char *str);
|
||||
|
||||
// reason is that TCB might be cleanup in idle task
|
||||
#define SAFE_TCB_FREE(T) \
|
||||
do { \
|
||||
int priority = uxTaskPriorityGet(NULL); \
|
||||
vTaskPrioritySet(NULL, tskIDLE_PRIORITY); \
|
||||
vTaskDelay(1); \
|
||||
vTaskPrioritySet(NULL, priority); \
|
||||
heap_caps_free(T); \
|
||||
} while (0)
|
||||
#endif
|
||||
@@ -67,5 +77,6 @@ char* kd_dump(key_data_t *kd);
|
||||
char* http_send(int sock, char *method, key_data_t *rkd);
|
||||
|
||||
char* kd_lookup(key_data_t *kd, char *key);
|
||||
bool kd_add(key_data_t *kd, char *key, char *value);
|
||||
bool kd_add(key_data_t *kd, char *key, char *value);
|
||||
char* kd_dump(key_data_t *kd);
|
||||
void kd_free(key_data_t *kd);
|
||||
|
||||
Reference in New Issue
Block a user