summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpTransceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/UdpTransceiver.cpp')
-rw-r--r--cpp/src/Ice/UdpTransceiver.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp
index dcc2e27d54d..12b31236281 100644
--- a/cpp/src/Ice/UdpTransceiver.cpp
+++ b/cpp/src/Ice/UdpTransceiver.cpp
@@ -327,11 +327,6 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
_fd = INVALID_SOCKET;
throw;
}
-
-#ifdef _WIN32
- FD_ZERO(&_rFdSet);
- FD_ZERO(&_wFdSet);
-#endif
}
IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const string& host, int port,
@@ -371,6 +366,10 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
#endif
const_cast<struct sockaddr_storage&>(_addr) = doBind(_fd, _addr);
+ if(getPort(_mcastAddr) == 0)
+ {
+ setPort(_mcastAddr, getPort(_addr));
+ }
setMcastGroup(_fd, _mcastAddr, mcastInterface);
}
else
@@ -407,11 +406,6 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
_fd = INVALID_SOCKET;
throw;
}
-
-#ifdef _WIN32
- FD_ZERO(&_rFdSet);
- FD_ZERO(&_wFdSet);
-#endif
}
IceInternal::UdpTransceiver::~UdpTransceiver()