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:
Günter Obiltschnig
2014-09-15 19:17:09 +02:00
parent 67b206f663
commit 63f4bfa54b
8 changed files with 120 additions and 35 deletions

View File

@@ -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()");
}