mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
fixed NetworkInterface for WinCE
code cleanup in NetworkInterface class IPAddress: do not format IPv6 loopback address as IPv4 compatible workaround for WEC2013 getsockname() issue testsuite fixes for WEC2013
This commit is contained in:
@@ -159,16 +159,19 @@ IPAddress::IPAddress(unsigned prefix, Family family)
|
||||
{
|
||||
if (prefix <= 32)
|
||||
newIPv4(prefix);
|
||||
else
|
||||
throw Poco::InvalidArgumentException("Invalid prefix length passed to IPAddress()");
|
||||
}
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (family == IPv6)
|
||||
{
|
||||
if (prefix <= 128)
|
||||
newIPv6(prefix);
|
||||
else
|
||||
throw Poco::InvalidArgumentException("Invalid prefix length passed to IPAddress()");
|
||||
}
|
||||
#endif
|
||||
else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
|
||||
if (!pImpl()) throw Poco::InvalidArgumentException("Invalid prefix length passed to IPAddress()");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user