diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-02-13 10:27:54 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-02-13 10:27:54 +0100 |
commit | 1d38c9ddfe1671bacfd80884268bc58c43cb8efa (patch) | |
tree | 0056fd98c598fcd44fad8f0db3479988bd9e6be1 /cpp | |
parent | Fixed ICE-5228: IceGrid/replication failure (diff) | |
download | ice-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.cpp | 6 |
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; |