diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-12 17:29:37 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-12 17:29:37 +0000 |
commit | 4952f17288ca415f4b18fdf9990698197d74fbb2 (patch) | |
tree | 9f632e11b149c7f597833b3b14c444670aec1930 | |
parent | 8035ce310296944ee9b07e522fa2069891418ddf (diff) | |
download | ATCD-4952f17288ca415f4b18fdf9990698197d74fbb2.tar.gz |
ChangeLogTag:Wed Jun 12 13:24:11 2002 Carlos O'Ryan <coryan@atdesk.com>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 13 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Acceptor.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Acceptor.cpp | 11 |
5 files changed, 48 insertions, 7 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 822936b42d3..1a58ada55de 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,16 @@ +Wed Jun 12 13:24:11 2002 Carlos O'Ryan <coryan@atdesk.com> + + * tao/IIOP_Acceptor.cpp: + * tao/Strategies/DIOP_Acceptor.cpp: + Fixed bug 1220 for IIOP and DIOP endpoints. For other protocols + either the bug does not apply (UIOP and UIPMC) or the problem is + more complicated than what I can handle today. + + * tao/Strategies/SHMIOP_Acceptor.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp: + Documented potential problems with the current collocation + approach. + Wed Jun 12 07:42:00 2002 Michael Kircher <Michael.Kircher@siemens.com> * docs/ORBEndpoints.html: diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp index c17cfcbd0ed..e606e973301 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp @@ -345,7 +345,12 @@ TAO_SSLIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) for (size_t i = 0; i < this->endpoint_count_; ++i) { - // compare the port and sin_addr (numeric host address) + // @@ TODO The following code looks funky, why only the address + // is compared? What about the IIOP address? Why force a + // DNS lookup every time an SSLIOP object is decoded: + // + // http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1220 + // if (endp->iiop_endpoint ()->object_addr () == this->addrs_[i]) return 1; // Collocated } diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 0d55ecfa481..9017022f2e5 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -247,12 +247,18 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) for (size_t i = 0; i < this->endpoint_count_; ++i) { - // compare the port and sin_addr (numeric host address) - if (endp->object_addr () == this->addrs_[i]) - return 1; // Collocated + // compare the port and host name. Please do *NOT* optimize + // this code by comparing the IP address instead. That would + // trigger the following bug: + // + // http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1220 + // + if (endp->port() == this->addrs_[i].get_port_number() + && ACE_OS::strcmp(endp->host(), this->hosts_[i]) == 0) + return 1; } - return 0; // Not collocated + return 0; } int diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index 9a5245bd7b1..e8dc4794f93 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -210,8 +210,14 @@ TAO_DIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) for (size_t i = 0; i < this->endpoint_count_; ++i) { - // compare the port and sin_addr (numeric host address) - if (endp->object_addr () == this->addrs_[i]) + // compare the port and host name. Please do *NOT* optimize + // this code by comparing the IP address instead. That would + // trigger the following bug: + // + // http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1220 + // + if (endp->port() == this->addrs_[i].get_port_number() + && ACE_OS::strcmp(endp->host(), this->hosts_[i]) == 0) return 1; // Collocated } diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp index 4fc08eccdd2..2072e61a650 100644 --- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp @@ -194,6 +194,17 @@ 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) return this->address_.same_host (endp->object_addr ()); } |