mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 02:37:31 +02:00
freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY. * Original commit: espressif/esp-idf@57fd78f5ba
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
f78e8cfce8
commit
085dbd8c4e
@ -238,7 +238,7 @@ esp_err_t _mdns_send_rx_action(mdns_rx_packet_t * packet)
|
||||
|
||||
action->type = ACTION_RX_HANDLE;
|
||||
action->data.rx_handle.packet = packet;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
@ -4672,7 +4672,7 @@ static esp_err_t _mdns_send_search_action(mdns_action_type_t type, mdns_search_o
|
||||
|
||||
action->type = type;
|
||||
action->data.search_add.search = search;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
@ -4706,7 +4706,7 @@ static void _mdns_scheduler_run(void)
|
||||
action->type = ACTION_TX_HANDLE;
|
||||
action->data.tx_handle.packet = p;
|
||||
p->queued = true;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
p->queued = false;
|
||||
}
|
||||
@ -4854,7 +4854,7 @@ static esp_err_t _mdns_service_task_stop(void)
|
||||
mdns_action_t action;
|
||||
mdns_action_t * a = &action;
|
||||
action.type = ACTION_TASK_STOP;
|
||||
if (xQueueSend(_mdns_server->action_queue, &a, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &a, (TickType_t)0) != pdPASS) {
|
||||
vTaskDelete(_mdns_service_task_handle);
|
||||
_mdns_service_task_handle = NULL;
|
||||
}
|
||||
@ -4897,7 +4897,7 @@ static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
action->data.sys_event.interface = event->esp_netif;
|
||||
}
|
||||
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
}
|
||||
}
|
||||
@ -5056,7 +5056,7 @@ esp_err_t mdns_hostname_set(const char * hostname)
|
||||
action->type = ACTION_HOSTNAME_SET;
|
||||
action->data.hostname_set.hostname = new_hostname;
|
||||
action->data.hostname_set.calling_task = xTaskGetCurrentTaskHandle();
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(new_hostname);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5087,7 +5087,7 @@ esp_err_t mdns_delegate_hostname_add(const char * hostname, const mdns_ip_addr_t
|
||||
action->type = ACTION_DELEGATE_HOSTNAME_ADD;
|
||||
action->data.delegate_hostname.hostname = new_hostname;
|
||||
action->data.delegate_hostname.address_list = copy_address_list(address_list);
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(new_hostname);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5116,7 +5116,7 @@ esp_err_t mdns_delegate_hostname_remove(const char * hostname)
|
||||
}
|
||||
action->type = ACTION_DELEGATE_HOSTNAME_REMOVE;
|
||||
action->data.delegate_hostname.hostname = new_hostname;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(new_hostname);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5150,7 +5150,7 @@ esp_err_t mdns_instance_name_set(const char * instance)
|
||||
}
|
||||
action->type = ACTION_INSTANCE_SET;
|
||||
action->data.instance = new_instance;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(new_instance);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5202,7 +5202,7 @@ esp_err_t mdns_service_add_for_host(const char * instance, const char * service,
|
||||
}
|
||||
action->type = ACTION_SERVICE_ADD;
|
||||
action->data.srv_add.service = item;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
_mdns_free_service(s);
|
||||
free(item);
|
||||
free(action);
|
||||
@ -5216,7 +5216,7 @@ esp_err_t mdns_service_add_for_host(const char * instance, const char * service,
|
||||
if (expired >= timeout_ticks) {
|
||||
return ESP_FAIL; // Timeout
|
||||
}
|
||||
vTaskDelay(MIN(10 / portTICK_RATE_MS, timeout_ticks - expired));
|
||||
vTaskDelay(MIN(10 / portTICK_PERIOD_MS, timeout_ticks - expired));
|
||||
}
|
||||
|
||||
return ESP_OK;
|
||||
@ -5260,7 +5260,7 @@ esp_err_t mdns_service_port_set_for_host(const char *instance, const char * serv
|
||||
action->type = ACTION_SERVICE_PORT_SET;
|
||||
action->data.srv_port.service = s;
|
||||
action->data.srv_port.port = port;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
@ -5304,7 +5304,7 @@ esp_err_t mdns_service_txt_set_for_host(const char * instance, const char * serv
|
||||
action->data.srv_txt_replace.service = s;
|
||||
action->data.srv_txt_replace.txt = new_txt;
|
||||
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
_mdns_free_linked_txt(new_txt);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5358,7 +5358,7 @@ esp_err_t mdns_service_txt_item_set_for_host_with_explicit_value_len(const char
|
||||
action->data.srv_txt_set.value = NULL;
|
||||
action->data.srv_txt_set.value_len = 0;
|
||||
}
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action->data.srv_txt_set.key);
|
||||
free(action->data.srv_txt_set.value);
|
||||
free(action);
|
||||
@ -5417,7 +5417,7 @@ esp_err_t mdns_service_txt_item_remove_for_host(const char * instance, const cha
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action->data.srv_txt_del.key);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5458,7 +5458,7 @@ esp_err_t mdns_service_subtype_add_for_host(const char *instance_name, const cha
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action->data.srv_subtype_add.subtype);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5493,7 +5493,7 @@ esp_err_t mdns_service_instance_name_set_for_host(const char * instance_old, con
|
||||
action->type = ACTION_SERVICE_INSTANCE_SET;
|
||||
action->data.srv_instance.service = s;
|
||||
action->data.srv_instance.instance = new_instance;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(new_instance);
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@ -5526,7 +5526,7 @@ esp_err_t mdns_service_remove_for_host(const char * instance, const char * servi
|
||||
}
|
||||
action->type = ACTION_SERVICE_DEL;
|
||||
action->data.srv_del.service = s;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
@ -5556,7 +5556,7 @@ esp_err_t mdns_service_remove_all(void)
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
action->type = ACTION_SERVICES_CLEAR;
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
|
||||
if (xQueueSend(_mdns_server->action_queue, &action, (TickType_t)0) != pdPASS) {
|
||||
free(action);
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
|
Reference in New Issue
Block a user