From 1f0df1ef976b865c97379d326d59f971a7850fc9 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Fri, 10 Feb 2017 13:49:43 +0200 Subject: [PATCH] Fix wrong return values for WiFi::softAPConfig fixes: https://github.com/espressif/arduino-esp32/issues/191 --- libraries/WiFi/src/WiFiAP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/WiFi/src/WiFiAP.cpp b/libraries/WiFi/src/WiFiAP.cpp index 8fb10ad1..9db49196 100644 --- a/libraries/WiFi/src/WiFiAP.cpp +++ b/libraries/WiFi/src/WiFiAP.cpp @@ -154,8 +154,8 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress info.gw.addr = static_cast(gateway); info.netmask.addr = static_cast(subnet); tcpip_adapter_dhcps_stop(TCPIP_ADAPTER_IF_AP); - if(tcpip_adapter_set_ip_info(TCPIP_ADAPTER_IF_AP, &info)) { - return tcpip_adapter_dhcps_start(TCPIP_ADAPTER_IF_AP); + if(tcpip_adapter_set_ip_info(TCPIP_ADAPTER_IF_AP, &info) == ESP_OK) { + return tcpip_adapter_dhcps_start(TCPIP_ADAPTER_IF_AP) == ESP_OK; } return false; }