Skip to content

Commit

Permalink
fix(openthread): allow setting netif_idx of udp pcb to no_index
Browse files Browse the repository at this point in the history
  • Loading branch information
gytxxsy authored and zwx1995esp committed Dec 21, 2023
1 parent dd83f65 commit f29d324
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/openthread/src/port/esp_openthread_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f29d324

Please sign in to comment.