Skip to content

Commit a5dedc4

Browse files
authored
Update WiFiAP.cpp
1 parent acc0b4e commit a5dedc4

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

libraries/WiFi/src/WiFiAP.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -205,23 +205,7 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress
205205
}
206206

207207
err = set_esp_interface_ip(ESP_IF_WIFI_AP, local_ip, gateway, subnet);
208-
209-
// testing effectiveness of the operation beyond internal DHCP Client process
210-
esp_netif_ip_info_t ip;
211-
if(esp_netif_get_ip_info(get_esp_interface_netif(ESP_IF_WIFI_AP), &ip) != ESP_OK){
212-
log_e("Netif Get IP Failed!");
213-
return false;
214-
}
215-
bool ip_ok = IPAddress(ip.ip.addr) == local_ip;
216-
bool gw_ok = IPAddress(ip.gw.addr) == gateway;
217-
bool mk_ok = IPAddress(ip.netmask.addr) == subnet;
218-
219-
if (ip_ok && gw_ok && mk_ok) {
220-
return true;
221-
} else {
222-
log_e("Failed setting: %s %s %s", ip_ok ? "" : "Static IP", gw_ok ? "" : "- Gateway", mk_ok ? "" : "- Netmask");
223-
return false;
224-
}
208+
return err == ESP_OK;
225209
}
226210

227211

0 commit comments

Comments
 (0)