This repository was archived by the owner on May 12, 2022. It is now read-only.
File tree 1 file changed +4
-3
lines changed
Filter options
1 file changed +4
-3
lines changed
Original file line number Diff line number Diff line change @@ -283,8 +283,9 @@ bool WiFiSTAClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subne
283
283
}
284
284
285
285
tcpip_adapter_ip_info_t info;
286
+ log_d (" STA IP uint32_t: %u.%u.%u.%u\n " , local_ip[0 ], local_ip[1 ], local_ip[2 ], local_ip[3 ]);
286
287
287
- if (local_ip != (uint32_t )0x00000000 ){
288
+ if (local_ip != (uint32_t )0x00000000 && local_ip != INADDR_NONE ){
288
289
info.ip .addr = static_cast <uint32_t >(local_ip);
289
290
info.gw .addr = static_cast <uint32_t >(gateway);
290
291
info.netmask .addr = static_cast <uint32_t >(subnet);
@@ -320,13 +321,13 @@ bool WiFiSTAClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subne
320
321
ip_addr_t d;
321
322
d.type = IPADDR_TYPE_V4;
322
323
323
- if (dns1 != (uint32_t )0x00000000 ) {
324
+ if (dns1 != (uint32_t )0x00000000 && dns1 != INADDR_NONE ) {
324
325
// Set DNS1-Server
325
326
d.u_addr .ip4 .addr = static_cast <uint32_t >(dns1);
326
327
dns_setserver (0 , &d);
327
328
}
328
329
329
- if (dns2 != (uint32_t )0x00000000 ) {
330
+ if (dns2 != (uint32_t )0x00000000 && dns2 != INADDR_NONE ) {
330
331
// Set DNS2-Server
331
332
d.u_addr .ip4 .addr = static_cast <uint32_t >(dns2);
332
333
dns_setserver (1 , &d);
You can’t perform that action at this time.
0 commit comments