mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
smartconfig: Fix smartconfig set socket option fail
This commit is contained in:
parent
87f8a0d5f1
commit
51e196ac93
@ -127,7 +127,15 @@ static void sc_ack_send_task(void *pvParameters)
|
||||
goto _end;
|
||||
}
|
||||
|
||||
setsockopt(send_sock, SOL_SOCKET, SO_BROADCAST | SO_REUSEADDR, &optval, sizeof(int));
|
||||
if (setsockopt(send_sock, SOL_SOCKET, SO_BROADCAST, &optval, sizeof(int)) < 0) {
|
||||
ESP_LOGE(TAG, "setsockopt SO_BROADCAST failed");
|
||||
goto _end;
|
||||
}
|
||||
|
||||
if (setsockopt(send_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(int)) < 0) {
|
||||
ESP_LOGE(TAG, "setsockopt SO_REUSEADDR failed");
|
||||
goto _end;
|
||||
}
|
||||
|
||||
if (ack->type == SC_TYPE_AIRKISS) {
|
||||
char data = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user