kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/fix_smartconfig_setopt_fail_v4.4' into 'release/v4.4'
smartconfig: Fix smartconfig set socket option fail (backport v4.4) See merge request espressif/esp-idf!16772pull/8353/head
commit
6114ac2994
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2010-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -121,8 +121,13 @@ static void sc_ack_send_task(void *pvParameters)
|
|||
goto _end;
|
||||
}
|
||||
|
||||
if (setsockopt(send_sock, SOL_SOCKET, SO_BROADCAST | SO_REUSEADDR, &optval, sizeof(int)) < 0) {
|
||||
ESP_LOGE(TAG, "setsockopt failed");
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue