summaryrefslogtreecommitdiff
path: root/cpp/src/IceDiscovery/PluginI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-10-27 19:11:20 +0100
committerBenoit Foucher <benoit@zeroc.com>2014-10-27 19:11:20 +0100
commit8c701618a42fc6c08456e53154bac1a1d40f9534 (patch)
treec6683dbbd27d9d85aa9d9b139ca0e2bd175ef54d /cpp/src/IceDiscovery/PluginI.cpp
parentICE-5781: UDP test failure with IPv6 on OS X (diff)
downloadice-8c701618a42fc6c08456e53154bac1a1d40f9534.tar.bz2
ice-8c701618a42fc6c08456e53154bac1a1d40f9534.tar.xz
ice-8c701618a42fc6c08456e53154bac1a1d40f9534.zip
Fixed IceDiscovery and IceGridDiscovery to check for Ice.PreferIPv6Address to configure UDP
Diffstat (limited to 'cpp/src/IceDiscovery/PluginI.cpp')
-rw-r--r--cpp/src/IceDiscovery/PluginI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp
index 88c2bb91ba5..60bdf42e9a4 100644
--- a/cpp/src/IceDiscovery/PluginI.cpp
+++ b/cpp/src/IceDiscovery/PluginI.cpp
@@ -41,8 +41,9 @@ PluginI::initialize()
Ice::PropertiesPtr properties = _communicator->getProperties();
bool ipv4 = properties->getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0;
+ bool preferIPv6 = properties->getPropertyAsInt("Ice.PreferIPv6Address") > 0;
string address;
- if(ipv4)
+ if(ipv4 && !preferIPv6)
{
address = properties->getPropertyWithDefault("IceDiscovery.Address", "239.255.0.1");
}