summaryrefslogtreecommitdiff
path: root/TAO/tao/Acceptor_Registry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Acceptor_Registry.cpp')
-rw-r--r--TAO/tao/Acceptor_Registry.cpp43
1 files changed, 18 insertions, 25 deletions
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp
index 10c21c531e2..2c9e324c692 100644
--- a/TAO/tao/Acceptor_Registry.cpp
+++ b/TAO/tao/Acceptor_Registry.cpp
@@ -48,27 +48,6 @@ TAO_Acceptor_Registry::endpoint_count (void)
}
int
-TAO_Acceptor_Registry::make_mprofile (const TAO_ObjectKey &object_key,
- TAO_MProfile &mprofile,
- TAO_Acceptor_Filter *filter)
-{
- // Allocate space for storing the profiles. There can never be more
- // profiles than there are endpoints. In some cases, there can be
- // fewer profiles than endpoints.
- size_t pfile_count = this->endpoint_count ();
- if (mprofile.set (pfile_count) < 0)
- return -1;
-
- // Leave it to the filter to decide which acceptors/in which order
- // go into the mprofile.
- return filter->fill_mprofile (object_key,
- mprofile,
- this->begin (),
- this->end ());
-
-}
-
-int
TAO_Acceptor_Registry::is_collocated (const TAO_MProfile &mprofile)
{
TAO_AcceptorSetIterator end = this->end ();
@@ -115,7 +94,7 @@ TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag)
for (;
acceptor != end ;
- acceptor++)
+ ++acceptor)
{
if ((*acceptor)->tag () == tag)
return *acceptor;
@@ -124,9 +103,10 @@ TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag)
return 0;
}
-
int
TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
+ ACE_Reactor *reactor,
+ int ignore_address,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -141,7 +121,9 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
// All TAO pluggable protocols are expected to have the ability
// to create a default endpoint.
- if (this->open_default (orb_core, 0) == -1)
+ if (this->open_default (orb_core,
+ reactor,
+ 0) == -1)
ACE_THROW_RETURN (CORBA::INTERNAL (
CORBA_SystemException::_tao_minor_code (
TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
@@ -263,8 +245,10 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
ACE_CString addrs = iop.substring (slot + 3);
int result = this->open_i (orb_core,
+ reactor,
addrs,
factory,
+ ignore_address,
ACE_TRY_ENV);
ACE_CHECK_RETURN (-1);
@@ -304,6 +288,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
// Iterate through the loaded transport protocols and create a default
// server for each protocol.
int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
+ ACE_Reactor *reactor,
const char *options)
{
TAO_ProtocolFactorySet *pfs = orb_core->protocol_factories ();
@@ -336,6 +321,7 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
if (!(*i)->factory ()->requires_explicit_endpoint ())
{
if (this->open_default (orb_core,
+ reactor,
TAO_DEF_GIOP_MAJOR, // default major
TAO_DEF_GIOP_MINOR, // default minor
i,
@@ -367,6 +353,7 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
// the indicated protocol.
int
TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
+ ACE_Reactor *reactor,
int major,
int minor,
TAO_ProtocolFactorySetItor &factory,
@@ -392,6 +379,7 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
// Initialize the acceptor to listen on a default endpoint.
if (acceptor->open_default (orb_core,
+ reactor,
major,
minor,
options) == -1)
@@ -478,8 +466,10 @@ TAO_Acceptor_Registry::extract_endpoint_version (ACE_CString &address,
int
TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
+ ACE_Reactor *reactor,
ACE_CString &addrs,
TAO_ProtocolFactorySetItor &factory,
+ int ignore_address,
CORBA::Environment &ACE_TRY_ENV)
{
ACE_CString options_tmp;
@@ -521,12 +511,14 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
minor);
// Check for existence of endpoint.
- if (address.length () == 0)
+ if (address.length () == 0 ||
+ ignore_address)
{
// Protocol prefix was specified without any endpoints.
// All TAO pluggable protocols are expected to have the
// ability to create a default endpoint.
if (this->open_default (orb_core,
+ reactor,
major,
minor,
factory,
@@ -546,6 +538,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
// An explicit endpoint was provided.
else if (acceptor->open (orb_core,
+ reactor,
major,
minor,
address.c_str (),