mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 20:56:01 -04:00
fix(openthread): allow setting netif_idx of udp pcb to no_index
This commit is contained in:
parent
dd83f65e5c
commit
f29d324691
@ -256,13 +256,7 @@ otError otPlatUdpBind(otUdpSocket *udp_socket)
|
||||
static void udp_bind_netif_task(void *ctx)
|
||||
{
|
||||
udp_bind_netif_task_t *task = (udp_bind_netif_task_t *)ctx;
|
||||
struct netif* target = 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);
|
||||
}
|
||||
udp_bind_netif(task->pcb, netif_get_by_index(task->netif_index));
|
||||
xTaskNotifyGive(task->source_task);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user