mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
more compatibility fixes to IPAddress, restore INADDR_ANY, INADDR_NONE (#5416)
This commit is contained in:
@ -234,7 +234,7 @@ void WiFiUDP::flush()
|
||||
IPAddress WiFiUDP::remoteIP() const
|
||||
{
|
||||
if (!_ctx)
|
||||
return IPNoAddress;
|
||||
return INADDR_ANY;
|
||||
|
||||
return _ctx->getRemoteAddress();
|
||||
}
|
||||
@ -250,7 +250,7 @@ uint16_t WiFiUDP::remotePort() const
|
||||
IPAddress WiFiUDP::destinationIP() const
|
||||
{
|
||||
if (!_ctx)
|
||||
return IPNoAddress;
|
||||
return INADDR_ANY;
|
||||
|
||||
return _ctx->getDestAddress();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ int DNSClient::getHostByName(const char* aHostname, IPAddress& aResult)
|
||||
}
|
||||
|
||||
// Check we've got a valid DNS server to use
|
||||
if (iDNSServer == IPNoAddress)
|
||||
if (iDNSServer == INADDR_NONE || iDNSServer == INADDR_ANY)
|
||||
{
|
||||
return INVALID_SERVER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user