mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
fix(openthread): allow setting netif_idx of udp pcb to no_index
This commit is contained in:
@@ -256,13 +256,7 @@ otError otPlatUdpBind(otUdpSocket *udp_socket)
|
|||||||
static void udp_bind_netif_task(void *ctx)
|
static void udp_bind_netif_task(void *ctx)
|
||||||
{
|
{
|
||||||
udp_bind_netif_task_t *task = (udp_bind_netif_task_t *)ctx;
|
udp_bind_netif_task_t *task = (udp_bind_netif_task_t *)ctx;
|
||||||
struct netif* target = netif_get_by_index(task->netif_index);
|
udp_bind_netif(task->pcb, netif_get_by_index(task->netif_index));
|
||||||
if (target == NULL) {
|
|
||||||
task->err = ESP_FAIL;
|
|
||||||
ESP_LOGE(OT_PLAT_LOG_TAG, "Failed to bind udp on index%d netif", task->netif_index);
|
|
||||||
} else {
|
|
||||||
udp_bind_netif(task->pcb, target);
|
|
||||||
}
|
|
||||||
xTaskNotifyGive(task->source_task);
|
xTaskNotifyGive(task->source_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user