diff options
Diffstat (limited to 'TAO/tao/Strategies')
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Acceptor.cpp | 15 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connector.cpp | 9 |
2 files changed, 10 insertions, 14 deletions
diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp index 2a582f8e2a5..83443fd6430 100644 --- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp @@ -153,18 +153,9 @@ TAO_SHMIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) if (endp == 0) return 0; - // @@ TODO The following code looks funky, why only the host - // name is compared? What if there are multiple SHMIOP - // servers in the same address? Why do SHMIOP_Endpoints keep - // a INET_Addr but not a MEM_Addr? And why is there no lazy - // evaluation of IP-addresses for SHMIOP endpoints? Is it - // because it is always 'localhost'? We need answers to - // these questions to solve: - // - // http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1220 - // - // The following code is suspec - // compare the port and sin_addr (numeric host address) + if (endp->port () != this->address_.get_port_number ()) + return 0; + return this->address_.same_host (endp->object_addr ()); } diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index bcf909b54ee..3f0532eb050 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -96,8 +96,14 @@ TAO_SHMIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) // Verify that the remote ACE_INET_Addr was initialized properly. // Failure can occur if hostname lookup failed when initializing the // remote ACE_INET_Addr. - if (remote_address.get_type () != AF_INET) + switch (remote_address.get_type ()) { + case AF_INET: +#ifdef ACE_HAS_IPV6 + case AF_INET6: +#endif + break; + default: if (TAO_debug_level > 0) { TAOLIB_ERROR ((LM_ERROR, @@ -111,7 +117,6 @@ TAO_SHMIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) } return 0; - } TAO_Transport * |