summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-02-13 10:27:54 +0100
committerBenoit Foucher <benoit@zeroc.com>2013-02-13 10:27:54 +0100
commit1d38c9ddfe1671bacfd80884268bc58c43cb8efa (patch)
tree0056fd98c598fcd44fad8f0db3479988bd9e6be1 /cpp
parentFixed ICE-5228: IceGrid/replication failure (diff)
downloadice-1d38c9ddfe1671bacfd80884268bc58c43cb8efa.tar.bz2
ice-1d38c9ddfe1671bacfd80884268bc58c43cb8efa.tar.xz
ice-1d38c9ddfe1671bacfd80884268bc58c43cb8efa.zip
Fixed binding IPv6 test failure on hosts without support for IPv6
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/binding/AllTests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp
index 40f411243b7..ee644b05702 100644
--- a/cpp/test/Ice/binding/AllTests.cpp
+++ b/cpp/test/Ice/binding/AllTests.cpp
@@ -846,6 +846,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
serverProps.push_back(localipv4);
serverProps.push_back(localipv6);
+ bool ipv6NotSupported = false;
for(vector<Ice::PropertiesPtr>::const_iterator p = serverProps.begin(); p != serverProps.end(); ++p)
{
Ice::InitializationData serverInitData;
@@ -863,6 +864,10 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const Ice::SocketException&)
{
+ if(*p == ipv6)
+ {
+ ipv6NotSupported = true;
+ }
continue; // IP version not supported.
}
@@ -894,6 +899,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test((*p == ipv4 && *q == ipv6) || (*p == ipv6 && *q == ipv4) ||
(*p == bothPreferIPv4 && *q == ipv6) || (*p == bothPreferIPv6 && *q == ipv4) ||
+ (*p == bothPreferIPv6 && *q == ipv6 && ipv6NotSupported) ||
(*p == anyipv4 && *q == ipv6) || (*p == anyipv6 && *q == ipv4) ||
(*p == localipv4 && *q == ipv6) || (*p == localipv6 && *q == ipv4));
continue;