summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpTransceiver.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-02-11 16:07:16 +0100
committerBenoit Foucher <benoit@zeroc.com>2013-02-11 16:07:16 +0100
commit0a52973ce569827357cfa9ac0a2e96c09ffbf7cc (patch)
treef219b25bebeca4f1e9e58e7174fe7870675b6246 /cpp/src/Ice/UdpTransceiver.cpp
parentAdd Makefile.mak rule to register assemblies in source dir. (diff)
downloadice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.tar.bz2
ice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.tar.xz
ice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.zip
Fixed ICE-5215: IPv6 support enabled by default
Diffstat (limited to 'cpp/src/Ice/UdpTransceiver.cpp')
-rw-r--r--cpp/src/Ice/UdpTransceiver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp
index b06335bc2f5..a50a4f5db60 100644
--- a/cpp/src/Ice/UdpTransceiver.cpp
+++ b/cpp/src/Ice/UdpTransceiver.cpp
@@ -965,7 +965,7 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
_logger(instance->initializationData().logger),
_stats(instance->initializationData().stats),
_incoming(true),
- _addr(getAddressForServer(host, port, instance->protocolSupport())),
+ _addr(getAddressForServer(host, port, instance->protocolSupport(), instance->preferIPv6())),
_state(connect ? StateNeedConnect : StateNotConnected)
#ifdef ICE_OS_WINRT
, _readPending(false)
@@ -975,6 +975,7 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
#endif
{
_fd = createSocket(true, _addr);
+ _fd = createServerSocket(true, _addr, instance->protocolSupport());
setBufSize(instance);
setBlock(_fd, false);
@@ -1011,7 +1012,7 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
// address won't be the multicast address and the client will
// therefore reject the datagram.
//
- const_cast<Address&>(_addr) = getAddressForServer("", port, getProtocolSupport(_addr));
+ const_cast<Address&>(_addr) = getAddressForServer("", port, getProtocolSupport(_addr), false);
#endif
const_cast<Address&>(_addr) = doBind(_fd, _addr);