Skip to content

Commit

Permalink
Merge branch 'fix/allow_bind_no_index_netif' into 'master'
Browse files Browse the repository at this point in the history
fix(openthread): allow setting netif_idx of udp pcb to no_index

See merge request espressif/esp-idf!28010
  • Loading branch information
chshu committed Dec 20, 2023
2 parents f4c74d8 + edb0063 commit d7b9a3b
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 d7b9a3b

Please sign in to comment.