summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-11-20 06:55:17 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-11-20 06:55:17 +0000
commita267ac36a7473a8f48b740233e4446375b2f0fd0 (patch)
treef9ee2697944865ac641def28e77ba196ac490aca
parent2c0596476d4119e73594e9bf53fc84f6b67cecbf (diff)
downloadATCD-a267ac36a7473a8f48b740233e4446375b2f0fd0.tar.gz
ChangeLogTag:Tue Nov 19 22:32:30 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/tao/Acceptor_Registry.cpp64
2 files changed, 43 insertions, 30 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 237f37f922b..5b71bf8a999 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Tue Nov 19 22:32:30 2002 Ossama Othman <ossama@uci.edu>
+
+ * tao/Acceptor_Registry.cpp (is_collocated):
+
+ Fixed problem where only the first endpoint in an endpoint chain
+ was used when determining if an acceptor is collocated despite
+ the fact the endpoint chain was "walked" when making this
+ determination.
+
Tue Nov 19 15:16:56 2002 Pradeep Gore <pradeep@oomworks.com>
* orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Filter_Consumer.bor:
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp
index d4d2eea735e..3e6e954d440 100644
--- a/TAO/tao/Acceptor_Registry.cpp
+++ b/TAO/tao/Acceptor_Registry.cpp
@@ -75,13 +75,18 @@ TAO_Acceptor_Registry::is_collocated (const TAO_MProfile &mprofile)
// Check all endpoints for address equality.
if ((*i)->tag () == pf->tag ())
- for (TAO_Endpoint *endp = pf->endpoint ();
- endp != 0;
- endp = endp->next ())
- {
- if ((*i)->is_collocated (pf->endpoint ()))
- return 1;
- }
+ {
+ // @note This can be a potentially expensive (O(n^2))
+ // operation if the below is_collocated() call
+ // also executes a loop.
+ for (TAO_Endpoint *endp = pf->endpoint ();
+ endp != 0;
+ endp = endp->next ())
+ {
+ if ((*i)->is_collocated (endp))
+ return 1;
+ }
+ }
}
}
@@ -91,10 +96,8 @@ TAO_Acceptor_Registry::is_collocated (const TAO_MProfile &mprofile)
TAO_Acceptor*
TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag)
{
- TAO_AcceptorSetIterator end =
- this->end ();
- TAO_AcceptorSetIterator acceptor =
- this->begin ();
+ TAO_AcceptorSetIterator end = this->end ();
+ TAO_AcceptorSetIterator acceptor = this->begin ();
for (;
acceptor != end ;
@@ -129,7 +132,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
reactor,
0) == -1)
ACE_THROW_RETURN (CORBA::INTERNAL (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
0),
CORBA::COMPLETED_NO),
@@ -154,12 +157,12 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- ACE_LIB_TEXT ("(%P|%t) Invalid endpoint specification: ")
- ACE_LIB_TEXT ("<%s>.\n"),
- ACE_TEXT_CHAR_TO_TCHAR(iop.c_str ())));
+ ACE_LIB_TEXT ("(%P|%t) Invalid endpoint ")
+ ACE_LIB_TEXT ("specification: <%s>.\n"),
+ ACE_TEXT_CHAR_TO_TCHAR (iop.c_str ())));
ACE_THROW_RETURN (CORBA::BAD_PARAM (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
EINVAL),
CORBA::COMPLETED_NO),
@@ -189,7 +192,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
ACE_NEW_THROW_EX (this->acceptors_,
TAO_Acceptor *[acceptor_count],
CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
ENOMEM),
CORBA::COMPLETED_NO));
@@ -211,12 +214,12 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- ACE_LIB_TEXT ("(%P|%t) Invalid endpoint specification: ")
- ACE_LIB_TEXT ("<%s>.\n"),
- ACE_TEXT_CHAR_TO_TCHAR(iop.c_str ())));
+ ACE_LIB_TEXT ("(%P|%t) Invalid endpoint ")
+ ACE_LIB_TEXT ("specification: <%s>.\n"),
+ ACE_TEXT_CHAR_TO_TCHAR (iop.c_str ())));
ACE_THROW_RETURN (CORBA::BAD_PARAM (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
EINVAL),
CORBA::COMPLETED_NO),
@@ -273,7 +276,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
ACE_LIB_TEXT ("was found.\n")));
ACE_THROW_RETURN (CORBA::BAD_PARAM (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
EINVAL),
CORBA::COMPLETED_NO),
@@ -344,7 +347,8 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
ACE_LIB_TEXT ("TAO (%P|%t) No default endpoints ")
ACE_LIB_TEXT ("opened.\n")
ACE_LIB_TEXT ("Please specify one or more using ")
- ACE_LIB_TEXT ("the \"-ORBEndpoint\" option.\n")));
+ ACE_LIB_TEXT ("the \"-ORBListenEndpoints\" ")
+ ACE_LIB_TEXT ("option.\n")));
}
return -1;
@@ -376,7 +380,7 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("TAO (%P|%t) unable to create ")
ACE_LIB_TEXT ("an acceptor for <%s>\n"),
- ACE_TEXT_CHAR_TO_TCHAR((*factory)->protocol_name ().c_str ())));
+ ACE_TEXT_CHAR_TO_TCHAR ((*factory)->protocol_name ().c_str ())));
return -1;
}
@@ -394,7 +398,7 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("TAO (%P|%t) unable to open ")
ACE_LIB_TEXT ("default acceptor for <%s>%p\n"),
- ACE_TEXT_CHAR_TO_TCHAR((*factory)->protocol_name ().c_str ()),
+ ACE_TEXT_CHAR_TO_TCHAR ((*factory)->protocol_name ().c_str ()),
ACE_LIB_TEXT ("")));
return -1;
@@ -534,7 +538,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
// one.
else
ACE_THROW_RETURN (CORBA::INTERNAL (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
0),
CORBA::COMPLETED_NO),
@@ -559,11 +563,11 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
ACE_LIB_TEXT ("TAO (%P|%t) ")
ACE_LIB_TEXT ("unable to open acceptor ")
ACE_LIB_TEXT ("for <%s>%p\n"),
- ACE_TEXT_CHAR_TO_TCHAR(address.c_str ()),
+ ACE_TEXT_CHAR_TO_TCHAR (address.c_str ()),
ACE_LIB_TEXT ("")));
ACE_THROW_RETURN (CORBA::BAD_PARAM (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
errno_value),
CORBA::COMPLETED_NO),
@@ -579,10 +583,10 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("TAO (%P|%t) unable to create ")
ACE_LIB_TEXT ("an acceptor for <%s>.\n"),
- ACE_TEXT_CHAR_TO_TCHAR(address.c_str ())));
+ ACE_TEXT_CHAR_TO_TCHAR (address.c_str ())));
ACE_THROW_RETURN (CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
+ CORBA::SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
ENOMEM),
CORBA::COMPLETED_NO),