diff options
Diffstat (limited to 'ace/SOCK_Dgram_Mcast.cpp')
-rw-r--r-- | ace/SOCK_Dgram_Mcast.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/ace/SOCK_Dgram_Mcast.cpp b/ace/SOCK_Dgram_Mcast.cpp index 2b3c3a5d2bf..e5ebee0b344 100644 --- a/ace/SOCK_Dgram_Mcast.cpp +++ b/ace/SOCK_Dgram_Mcast.cpp @@ -402,14 +402,24 @@ ACE_SOCK_Dgram_Mcast::subscribe (const ACE_INET_Addr &mcast_addr, // Tell network device driver to read datagrams with a // <mcast_request_if_> IP interface. - else if (ACE_OS::join_leaf (this->get_handle (), - ACE_reinterpret_cast (const sockaddr *, - &this->mcast_request_if_.imr_multiaddr), - sizeof this->mcast_request_if_.imr_multiaddr, - qos_params) == ACE_INVALID_HANDLE) - return -1; - else - return 0; + else + { + + sockaddr_in mult_addr; + + mult_addr.sin_family = protocol_family; + mult_addr.sin_port = ACE_HTONS (mcast_addr.get_port_number ()); + mult_addr.sin_addr = this->mcast_request_if_.imr_multiaddr; + + if (ACE_OS::join_leaf (this->get_handle (), + ACE_reinterpret_cast (const sockaddr *, + &mult_addr), + sizeof mult_addr, + qos_params) == ACE_INVALID_HANDLE) + return -1; + else + return 0; + } } int |