mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_arp_buffer_error_in_smart_config_v4.2' into 'release/v4.2'
bugfix/fix_arp_buffer_error_in_smart_config_v4.2 See merge request espressif/esp-idf!12254
This commit is contained in:
commit
359784f0b6
@ -144,23 +144,18 @@ static void sc_ack_send_task(void *pvParameters)
|
||||
vTaskDelay(100 / portTICK_RATE_MS);
|
||||
|
||||
sendlen = sendto(send_sock, &ack->ctx, ack_len, 0, (struct sockaddr*) &server_addr, sin_size);
|
||||
if (sendlen > 0) {
|
||||
/* Totally send 30 smartconfig ACKs. Then smartconfig is successful. */
|
||||
if (sendlen <= 0) {
|
||||
err = sc_ack_send_get_errno(send_sock);
|
||||
ESP_LOGD(TAG, "send failed, errno %d", err);
|
||||
vTaskDelay(100 / portTICK_RATE_MS);
|
||||
}
|
||||
|
||||
/* Send 30 smartconfig ACKs. Then smartconfig is successful. */
|
||||
if (packet_count++ >= SC_ACK_MAX_COUNT) {
|
||||
esp_event_post(SC_EVENT, SC_EVENT_SEND_ACK_DONE, NULL, 0, portMAX_DELAY);
|
||||
goto _end;
|
||||
}
|
||||
}
|
||||
else {
|
||||
err = sc_ack_send_get_errno(send_sock);
|
||||
if (err == ENOMEM || err == EAGAIN) {
|
||||
ESP_LOGD(TAG, "send failed, errno %d", err);
|
||||
continue;
|
||||
}
|
||||
ESP_LOGE(TAG, "send failed, errno %d", err);
|
||||
goto _end;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
vTaskDelay((portTickType)(100 / portTICK_RATE_MS));
|
||||
|
Loading…
Reference in New Issue
Block a user