diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 1999-05-22 04:01:48 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 1999-05-22 04:01:48 +0000 |
commit | 2f76689ec45430fa454e354fb6f28adef116e618 (patch) | |
tree | 87d7fec6bf7364ca5052b4bc3504259ba192f022 | |
parent | e598f40828502e0716320800bd8ca4a87e6e5ddd (diff) | |
download | ATCD-2f76689ec45430fa454e354fb6f28adef116e618.tar.gz |
Fixed compile-time errors.
-rw-r--r-- | TAO/tao/Acceptor_Registry.cpp | 23 | ||||
-rw-r--r-- | TAO/tao/Acceptor_Registry.h | 2 | ||||
-rw-r--r-- | TAO/tao/Connector_Registry.cpp | 42 | ||||
-rw-r--r-- | TAO/tao/Connector_Registry.h | 4 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 47 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.h | 2 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connector.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connector.h | 2 | ||||
-rw-r--r-- | TAO/tao/MProfile.i | 6 | ||||
-rw-r--r-- | TAO/tao/Makefile | 191 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 17 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.i | 3 | ||||
-rw-r--r-- | TAO/tao/Pluggable.h | 6 | ||||
-rw-r--r-- | TAO/tao/UIOP_Acceptor.cpp | 27 | ||||
-rw-r--r-- | TAO/tao/UIOP_Acceptor.h | 4 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connector.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connector.h | 2 | ||||
-rw-r--r-- | TAO/tao/params.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/params.h | 24 | ||||
-rw-r--r-- | TAO/tao/params.i | 4 |
21 files changed, 239 insertions, 198 deletions
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index 905895754e0..2f866e98b1f 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -9,6 +9,7 @@ #include "tao/Protocol_Factory.h" #include "tao/ORB_Core.h" #include "tao/params.h" +#include "tao/MProfile.h" #include "ace/Auto_Ptr.h" @@ -23,7 +24,7 @@ TAO_Acceptor_Registry::~TAO_Acceptor_Registry (void) size_t TAO_Acceptor_Registry::endpoint_count (void) { - int count; + int count = 0; TAO_AcceptorSetItor end = this->acceptors_.end (); TAO_AcceptorSetItor acceptor = @@ -37,16 +38,16 @@ TAO_Acceptor_Registry::endpoint_count (void) return count; } -TAO_Mprofile * +int TAO_Acceptor_Registry::make_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile) + TAO_MProfile &mprofile) { TAO_AcceptorSetItor end = this->acceptors_.end (); TAO_AcceptorSetItor acceptor = this->acceptors_.begin (); - for (; acceptor != end; acceptor++) + for (; acceptor != end; ++acceptor) { if ((*acceptor)->create_mprofile (object_key, mprofile) == -1) return -1; @@ -67,7 +68,7 @@ TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag) TAO_AcceptorSetItor acceptor = this->acceptors_.begin (); - for (; acceptor != end; acceptor++) + for (; acceptor != end; ++acceptor) { if ((*acceptor)->tag () == tag) return (*acceptor); @@ -114,6 +115,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core) TAO_EndpointSetIterator last_endpoint = orb_core->orb_params ()->endpoints ().end (); + ACE_Auto_Basic_Array_Ptr <char> addr_str; + for (TAO_EndpointSetIterator endpoint = first_endpoint; endpoint != last_endpoint; ++endpoint) @@ -149,10 +152,9 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core) TAO_ProtocolFactorySetItor factory = orb_core->protocol_factories ()->begin (); - TAO_Acceptor *acceptor; - for (acceptor = 0 ; - factory != end ; - factory++) + for (TAO_Acceptor *acceptor = 0; + factory != end; + ++factory) { if ((*factory)->factory ()->match_prefix (prefix)) { @@ -169,7 +171,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core) else { ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Unable to create an acceptor for %s\n", + "(%P|%t) Unable to create an " + "acceptor for %s\n", iop.c_str ()), -1); } diff --git a/TAO/tao/Acceptor_Registry.h b/TAO/tao/Acceptor_Registry.h index 823a0ee1e09..497eca7f374 100644 --- a/TAO/tao/Acceptor_Registry.h +++ b/TAO/tao/Acceptor_Registry.h @@ -95,7 +95,7 @@ public: // that will be created. int make_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile) + TAO_MProfile &mprofile); // add profiles to the mprofile object for all open endpoints. int is_collocated (const TAO_MProfile& mprofile); diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp index ad2aa4a1081..12abdac641a 100644 --- a/TAO/tao/Connector_Registry.cpp +++ b/TAO/tao/Connector_Registry.cpp @@ -43,11 +43,10 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core) orb_core->protocol_factories ()->end (); TAO_ProtocolFactorySetItor factory = orb_core->protocol_factories ()->begin (); - TAO_Connector *connector; - for (connector = 0; - factory != end ; - factory++) + for (TAO_Connector *connector = 0; + factory != end; + ++factory) { connector = (*factory)->factory ()->make_connector (); @@ -83,29 +82,28 @@ TAO_Connector_Registry::close_all (void) } int -TAO_Connector_Registry::preconnect (const char *the_preconnections) +TAO_Connector_Registry::preconnect (TAO_EndpointSet &preconnections) { - // @@ It would be good to use auto_ptr<> to guard against premature - // termination and, thus, leaks. - char *preconnections = ACE_OS::strdup (the_preconnections); + TAO_EndpointSetIterator first_endpoint_set = preconnections.begin (); + TAO_EndpointSetIterator last_endpoint_set = preconnections.end (); - TAO_ConnectorSetItor end = - this->connectors_.end (); - TAO_ConnectorSetItor connector = - this->connectors_.begin (); - - for (; - connector != end ; - connector++) + for (TAO_EndpointSetIterator i = first_endpoint_set; + i != last_endpoint_set; + ++i) { - if (*connector) - (*connector)->preconnect (preconnections); - } + TAO_ConnectorSetItor first_connector = this->connectors_.begin (); + TAO_ConnectorSetItor last_connector = this->connectors_.end (); + for (TAO_ConnectorSetItor connector = first_connector; + connector != last_connector ; + ++connector) + { + if (*connector) + (*connector)->preconnect ((*i).c_str ()); + } + } - ACE_OS::free (preconnections); - - return 0; + return 0; // Success } int diff --git a/TAO/tao/Connector_Registry.h b/TAO/tao/Connector_Registry.h index eb949524efb..68d6ffd5669 100644 --- a/TAO/tao/Connector_Registry.h +++ b/TAO/tao/Connector_Registry.h @@ -23,6 +23,8 @@ #include "tao/Pluggable.h" #include "tao/corbafwd.h" #include "tao/Typecode.h" +#include "tao/params.h" + #include "ace/Containers_T.h" // Forward declarations. @@ -67,7 +69,7 @@ public: int close_all (void); // Close all open connectors. - int preconnect (const char *the_preconnections); + int preconnect (TAO_EndpointSet &preconnections); // For this list of preconnections call the connector specific // preconnect method for each preconnection. diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 127cac7b1d3..7b51933f2b2 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -15,6 +15,7 @@ #include "tao/IIOP_Acceptor.h" #include "tao/IIOP_Profile.h" +#include "tao/MProfile.h" #include "tao/ORB_Core.h" #include "tao/Server_Strategy_Factory.h" #include "tao/GIOP.h" @@ -30,7 +31,7 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) // And isn't this the right place to setup the tagged components of // a v1.[12] profile? -/s/ @@ Fred&Ossama: We need to check this interface: a single +// @@ Fred&Ossama: We need to check this interface: a single // TAO_Acceptor may be bound to multiple addresses (think of a // multihomed machine with an acceptor listening on the wildcard // address), hence the "Right Thing" seems to be that we pass an @@ -38,36 +39,40 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) int TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile) + TAO_MProfile &mprofile) { // @@ For now we use teh IIOP address that has been // stored away in the ORB core. This is an optimization to get // around DNS lookups! - // ACE_INET_Addr new_address; - // if (base_acceptor_.acceptor ().get_local_addr (new_address) == -1) - // return 0; + ACE_INET_Addr new_address; + if (base_acceptor_.acceptor ().get_local_addr (new_address) == -1) + return 0; // we only make one - int count = mprofile->profile_count (); - if ((mprofile->size () - count) < 1) + int count = mprofile.profile_count (); + if ((mprofile.size () - count) < 1) { - if (mprofile->grow (count + 1) == -1) + if (mprofile.grow (count + 1) == -1) return -1; } - TAO_IIOP_Profile pfile; - // ACE_NEW_RETURN (pfile - // TAO_IIOP_Profile (new_address, object_key), - // -1); - ACE_NEW_RETURN (pfile - TAO_IIOP_Profile (orb_params->host (), - orb_params->addr ().get_port_number (), - key, - orb_params->addr ()), + TAO_IIOP_Profile *pfile; + ACE_NEW_RETURN (pfile, + TAO_IIOP_Profile (new_address, object_key), -1); - - if (mprofile->give_profile (pfile) == -1) + // @@ Fred: I removed the host() and addr() methods from the ORB core + // before you added this method. Any ideas on how to cache + // this value as per Carlos' suggestion in the is_collocated() + // method below? +// ACE_NEW_RETURN (pfile, +// TAO_IIOP_Profile (orb_params->host (), +// orb_params->addr ().get_port_number (), +// key, +// orb_params->addr ()), +// -1); + + if (mprofile.give_profile (pfile) == -1) return -1; return 0; @@ -86,7 +91,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Profile* pfile) if (this->base_acceptor_.acceptor ().get_local_addr (address) == -1) return 0; - // @@ Osssama: can you verify that this operator does the right thing? + // @@ Ossama: can you verify that this operator does the right thing? return profile->object_addr () == address; } @@ -118,7 +123,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, CORBA::ULong -TAO_IIOP_Profile::endpoint_count (void) +TAO_IIOP_Acceptor::endpoint_count (void) { // @@ for now just assume one! // we should take a look at the local address, if it is zero then diff --git a/TAO/tao/IIOP_Acceptor.h b/TAO/tao/IIOP_Acceptor.h index 8ab67f60a41..43ea952e915 100644 --- a/TAO/tao/IIOP_Acceptor.h +++ b/TAO/tao/IIOP_Acceptor.h @@ -53,7 +53,7 @@ public: // initialize acceptor for this address. int create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile); + TAO_MProfile &mprofile); // create profile objects for this Acceptor using the SAP // (service access point, Host and Port) and object_key. diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 09c3fcdf4d6..dadcb2fc587 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -85,8 +85,10 @@ TAO_IIOP_Connector::close (void) } int -TAO_IIOP_Connector::preconnect (char *preconnections) +TAO_IIOP_Connector::preconnect (const char *preconnects) { + char *preconnections = ACE_OS::strdup (preconnects); + #if 0 if (preconnections) { @@ -209,6 +211,9 @@ TAO_IIOP_Connector::preconnect (char *preconnections) } } #endif /* 0 */ + + ACE_OS::free (preconnections); + return successes; } diff --git a/TAO/tao/IIOP_Connector.h b/TAO/tao/IIOP_Connector.h index 6be0badba54..4cd4dcc90fb 100644 --- a/TAO/tao/IIOP_Connector.h +++ b/TAO/tao/IIOP_Connector.h @@ -46,7 +46,7 @@ public: int close (void); // Shutdown Connector bridge and concreate Connector. - int preconnect (char *preconnections); + int preconnect (const char *preconnections); // Initial set of connections to be established. int connect (TAO_Profile *profile, diff --git a/TAO/tao/MProfile.i b/TAO/tao/MProfile.i index f7da6dfa941..eda31207b91 100644 --- a/TAO/tao/MProfile.i +++ b/TAO/tao/MProfile.i @@ -164,7 +164,7 @@ TAO_MProfile::profile_count (void) const } ACE_INLINE CORBA::ULong -TAO_MProfile::size (void) const; +TAO_MProfile::size (void) const { return this->size_; } @@ -193,14 +193,14 @@ TAO_MProfile::grow (CORBA::ULong sz) // get the additional space TAO_Profile_ptr *new_pfiles, *old_pfiles; - ACE_NEW_RETURN (pfiles, + ACE_NEW_RETURN (new_pfiles, TAO_Profile_ptr[sz], -1); old_pfiles = this->pfiles_; // got it, now copy profiles - for (TAO_PHandle h = 0; h < this->size_; h++) + for (TAO_PHandle h = 0; h < this->size_; ++h) { new_pfiles[h] = old_pfiles[h]; old_pfiles[h] = 0; diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index e8d8a2c6827..e1b1a9c12f7 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -2890,9 +2890,8 @@ realclean: $(ACE_ROOT)/ace/Dynamic_Service.h \ $(ACE_ROOT)/ace/Dynamic_Service.cpp .obj/IIOP_Factory.o .obj/IIOP_Factory.so .shobj/IIOP_Factory.o .shobj/IIOP_Factory.so: IIOP_Factory.cpp \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Service_Config.h \ + $(TAO_ROOT)/tao/IIOP_Factory.h \ + $(TAO_ROOT)/tao/Protocol_Factory.h \ $(ACE_ROOT)/ace/Service_Object.h \ $(ACE_ROOT)/ace/Shared_Object.h \ $(ACE_ROOT)/ace/ACE.h \ @@ -2912,6 +2911,10 @@ realclean: $(ACE_ROOT)/ace/Event_Handler.h \ $(ACE_ROOT)/ace/Event_Handler.i \ $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Service_Config.h \ $(ACE_ROOT)/ace/Signal.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2962,26 +2965,10 @@ realclean: $(ACE_ROOT)/ace/Reactor.i \ $(ACE_ROOT)/ace/Reactor_Impl.h \ $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Svc_Handler.h \ $(ACE_ROOT)/ace/Synch_Options.h \ $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Task.h \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Functor.h \ $(ACE_ROOT)/ace/Functor.i \ @@ -2999,9 +2986,42 @@ realclean: $(ACE_ROOT)/ace/Service_Types.i \ $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/corbafwd.i \ + $(TAO_ROOT)/tao/Pluggable.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/IIOP_Acceptor.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ $(ACE_ROOT)/ace/Task_T.i \ $(ACE_ROOT)/ace/Task_T.cpp \ $(ACE_ROOT)/ace/Module.h \ @@ -3034,15 +3054,6 @@ realclean: $(ACE_ROOT)/ace/SOCK_Stream.i \ $(ACE_ROOT)/ace/Time_Value.h \ $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/corbafwd.i \ - $(TAO_ROOT)/tao/Pluggable.i \ $(TAO_ROOT)/tao/Connect.h \ $(TAO_ROOT)/tao/Connect.i \ $(TAO_ROOT)/tao/IIOP_Connector.h \ @@ -3054,17 +3065,6 @@ realclean: $(ACE_ROOT)/ace/Connector.cpp \ $(ACE_ROOT)/ace/SOCK_Connector.h \ $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/IIOP_Factory.h \ - $(TAO_ROOT)/tao/Protocol_Factory.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ $(ACE_ROOT)/ace/Dynamic_Service.h \ $(ACE_ROOT)/ace/Dynamic_Service.cpp .obj/IIOP_Profile.o .obj/IIOP_Profile.so .shobj/IIOP_Profile.o .shobj/IIOP_Profile.so: IIOP_Profile.cpp \ @@ -3925,9 +3925,8 @@ realclean: $(ACE_ROOT)/ace/Dynamic_Service.cpp \ $(TAO_ROOT)/tao/Server_Strategy_Factory.h .obj/UIOP_Factory.o .obj/UIOP_Factory.so .shobj/UIOP_Factory.o .shobj/UIOP_Factory.so: UIOP_Factory.cpp \ - $(TAO_ROOT)/tao/UIOP_Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Service_Config.h \ + $(TAO_ROOT)/tao/UIOP_Factory.h \ + $(TAO_ROOT)/tao/Protocol_Factory.h \ $(ACE_ROOT)/ace/Service_Object.h \ $(ACE_ROOT)/ace/Shared_Object.h \ $(ACE_ROOT)/ace/ACE.h \ @@ -3947,6 +3946,10 @@ realclean: $(ACE_ROOT)/ace/Event_Handler.h \ $(ACE_ROOT)/ace/Event_Handler.i \ $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Service_Config.h \ $(ACE_ROOT)/ace/Signal.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3997,26 +4000,10 @@ realclean: $(ACE_ROOT)/ace/Reactor.i \ $(ACE_ROOT)/ace/Reactor_Impl.h \ $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Svc_Handler.h \ $(ACE_ROOT)/ace/Synch_Options.h \ $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Task.h \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Functor.h \ $(ACE_ROOT)/ace/Functor.i \ @@ -4034,9 +4021,42 @@ realclean: $(ACE_ROOT)/ace/Service_Types.i \ $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/corbafwd.i \ + $(TAO_ROOT)/tao/Pluggable.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/UIOP_Acceptor.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ $(ACE_ROOT)/ace/Task_T.i \ $(ACE_ROOT)/ace/Task_T.cpp \ $(ACE_ROOT)/ace/Module.h \ @@ -4077,15 +4097,6 @@ realclean: $(ACE_ROOT)/ace/LSOCK.i \ $(ACE_ROOT)/ace/LSOCK_Stream.i \ $(ACE_ROOT)/ace/LSOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/corbafwd.i \ - $(TAO_ROOT)/tao/Pluggable.i \ $(TAO_ROOT)/tao/UIOP_Connect.h \ $(TAO_ROOT)/tao/UIOP_Connect.i \ $(TAO_ROOT)/tao/UIOP_Connector.h \ @@ -4100,16 +4111,6 @@ realclean: $(ACE_ROOT)/ace/SOCK_Connector.i \ $(ACE_ROOT)/ace/LSOCK_Connector.i \ $(TAO_ROOT)/tao/Resource_Factory.h \ - $(TAO_ROOT)/tao/Protocol_Factory.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ $(TAO_ROOT)/tao/IIOP_Connector.h \ $(TAO_ROOT)/tao/Connect.h \ $(TAO_ROOT)/tao/Connect.i \ @@ -4119,7 +4120,8 @@ realclean: $(TAO_ROOT)/tao/Exception.i \ $(TAO_ROOT)/tao/Typecode.i \ $(TAO_ROOT)/tao/Connector_Registry.h \ - $(TAO_ROOT)/tao/UIOP_Factory.h \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ $(ACE_ROOT)/ace/Dynamic_Service.h \ $(ACE_ROOT)/ace/Dynamic_Service.cpp .obj/UIOP_Profile.o .obj/UIOP_Profile.so .shobj/UIOP_Profile.o .shobj/UIOP_Profile.so: UIOP_Profile.cpp \ @@ -4750,6 +4752,8 @@ realclean: $(TAO_ROOT)/tao/Exception.i \ $(TAO_ROOT)/tao/Typecode.i \ $(TAO_ROOT)/tao/Connector_Registry.h \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ $(TAO_ROOT)/tao/UIOP_Profile.h \ $(TAO_ROOT)/tao/Object_KeyC.h \ $(TAO_ROOT)/tao/Object_KeyC.i \ @@ -4784,8 +4788,6 @@ realclean: $(TAO_ROOT)/tao/POAC.i \ $(TAO_ROOT)/tao/Servant_Base.i \ $(TAO_ROOT)/tao/Policy_Manager.i \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ $(TAO_ROOT)/tao/ORB_Core.i \ $(ACE_ROOT)/ace/Dynamic_Service.h \ $(ACE_ROOT)/ace/Dynamic_Service.cpp @@ -5641,6 +5643,8 @@ realclean: $(TAO_ROOT)/tao/Exception.i \ $(TAO_ROOT)/tao/Typecode.i \ $(TAO_ROOT)/tao/Connector_Registry.h \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ $(TAO_ROOT)/tao/IIOP_Acceptor.h \ $(TAO_ROOT)/tao/POA.h \ $(TAO_ROOT)/tao/POAC.h \ @@ -5692,8 +5696,6 @@ realclean: $(ACE_ROOT)/ace/Map_T.cpp \ $(TAO_ROOT)/tao/Key_Adapters.i \ $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ $(TAO_ROOT)/tao/Active_Object_Map.i \ $(TAO_ROOT)/tao/POAManager.h \ $(TAO_ROOT)/tao/poa_macros.h \ @@ -5716,6 +5718,10 @@ realclean: $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ $(ACE_ROOT)/ace/Select_Reactor_T.i \ $(ACE_ROOT)/ace/Select_Reactor.i \ + $(ACE_ROOT)/ace/XtReactor.h \ + $(ACE_ROOT)/ace/FlReactor.h \ + $(ACE_ROOT)/ace/Msg_WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Msg_WFMO_Reactor.i \ $(ACE_ROOT)/ace/Arg_Shifter.h \ $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ $(TAO_ROOT)/tao/ORB_Core.h \ @@ -8086,6 +8092,7 @@ realclean: $(ACE_ROOT)/ace/Auto_Ptr.h \ $(ACE_ROOT)/ace/Auto_Ptr.i \ $(ACE_ROOT)/ace/Auto_Ptr.cpp \ + $(ACE_ROOT)/ace/Arg_Shifter.h \ $(TAO_ROOT)/tao/Object.h \ $(TAO_ROOT)/tao/Object.i \ $(TAO_ROOT)/tao/Typecode.h \ @@ -12316,7 +12323,9 @@ realclean: $(TAO_ROOT)/tao/debug.h .obj/params.o .obj/params.so .shobj/params.o .shobj/params.so: params.cpp \ $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/ACE.h \ $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/inc_user_config.h \ @@ -12330,12 +12339,6 @@ realclean: $(ACE_ROOT)/ace/ACE.i \ $(ACE_ROOT)/ace/Log_Priority.h \ $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Malloc.h \ $(ACE_ROOT)/ace/Malloc_Base.h \ $(ACE_ROOT)/ace/Malloc.i \ @@ -12595,6 +12598,8 @@ realclean: $(TAO_ROOT)/tao/Exception.i \ $(TAO_ROOT)/tao/Typecode.i \ $(TAO_ROOT)/tao/Connector_Registry.h \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ $(ACE_ROOT)/ace/Dynamic_Service.h \ $(ACE_ROOT)/ace/Dynamic_Service.cpp .obj/Server_Strategy_Factory.o .obj/Server_Strategy_Factory.so .shobj/Server_Strategy_Factory.o .shobj/Server_Strategy_Factory.so: Server_Strategy_Factory.cpp \ diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 7b1386a2d2c..6b3053a2ea1 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -35,6 +35,7 @@ #include "tao/Object_Adapter.h" #include "tao/POA.h" #include "tao/Request.h" +#include "tao/MProfile.h" #ifdef TAO_HAS_VALUETYPE # include "tao/ValueFactory_Map.h" #endif /* TAO_HAS_VALUETYPE */ @@ -49,7 +50,6 @@ ACE_RCSID(tao, ORB, "$Id$") static const char ior_prefix [] = "IOR:"; -static const char iioploc_prefix [] = "iioploc:"; static const char file_prefix[] = "file://"; #if defined (ACE_ENABLE_TIMEPROBES) @@ -940,16 +940,13 @@ CORBA_ORB::create_stub_object (const TAO_ObjectKey &key, TAO_Stub *stub = 0; - TAO_ORB_Parameters *orb_params = - this->orb_core_->orb_params (); - size_t pfile_count = this->orb_core_->acceptor_registry ()->endpoint_count (); // First we create a profile list, well actually the empty container TAO_MProfile mp (pfile_count); - this->orb_core_->acceptor_registry ()->make_mprofilekey, mp); + this->orb_core_->acceptor_registry ()->make_mprofile (key, mp); ACE_CHECK_RETURN (stub); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 4d0f08259b6..f84686ca3c5 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -232,7 +232,7 @@ TAO_ORB_Core::init (int &argc, char *argv[]) } else if (ACE_OS::strcmp (current_arg, "-ORBendpoint") == 0) { - // Each "endpoint" is of the form: + // Each "endpoint" is of the form: // // protocol:V.v//addr1,addr2,...,addrN/ // @@ -242,6 +242,13 @@ TAO_ORB_Core::init (int &argc, char *argv[]) // // where "V.v" is an optional version. All preconnect or endpoint // strings should be of the above form(s). + // + // Multiple sets of endpoint may be seperated by a semi-colon `;'. + // For example: + // + // iiop://space:2001,odyssey:2010/;uiop://foo,bar/ + // + // All preconnect or endpoint strings should be of the above form(s). arg_shifter.consume_arg (); @@ -283,7 +290,7 @@ TAO_ORB_Core::init (int &argc, char *argv[]) // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - "(%P|%t) The `-ORBhost' option is obsolete.\n" + "(%P|%t) WARNING: The `-ORBhost' option is obsolete.\n" "In the future, use the `-ORBendpoint' option.\n")); if (arg_shifter.is_parameter_next()) @@ -345,7 +352,7 @@ TAO_ORB_Core::init (int &argc, char *argv[]) // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - "(%P|%t) The `-ORBport' option is obsolete.\n" + "(%P|%t) WARNING: The `-ORBport' option is obsolete.\n" "In the future, use the `-ORBendpoint' option.\n")); // Specify the port number/name on which we should listen @@ -492,8 +499,8 @@ TAO_ORB_Core::init (int &argc, char *argv[]) // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - "(%P|%t) The `host:port' pair style for " - "`-ORBpreconnect' is obsolete.\n" + "(%P|%t) WARNING: The `host:port' pair style " + "for `-ORBpreconnect' is obsolete.\n" "In the future, use the URL style.\n")); p = diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i index caa8cfa5b60..104d601f8f4 100644 --- a/TAO/tao/ORB_Core.i +++ b/TAO/tao/ORB_Core.i @@ -1,3 +1,4 @@ +// -*- C++ -*- // $Id$ #include "ace/Dynamic_Service.h" @@ -107,7 +108,7 @@ TAO_ORB_Core::protocol_factories (TAO_ProtocolFactorySet *pf) return old; } -ACE_INLINE TAO_ProtocolFactorySet * +ACE_INLINE TAO_ProtocolFactorySet * TAO_ORB_Core::protocol_factories (void) { return TAO_OC_RETRIEVE (protocol_factories); diff --git a/TAO/tao/Pluggable.h b/TAO/tao/Pluggable.h index 89eaa4ab789..d65050be875 100644 --- a/TAO/tao/Pluggable.h +++ b/TAO/tao/Pluggable.h @@ -287,7 +287,7 @@ public: TAO_Acceptor (CORBA::ULong tag); virtual int create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile) = 0; + TAO_MProfile &mprofile) = 0; // Create the corresponding profile for this endpoint. virtual int open (TAO_ORB_Core *orb_core, ACE_CString &address) = 0; @@ -302,7 +302,7 @@ public: CORBA::ULong tag (void) const; // The tag, each concrete class will have a specific tag value. - CORBA::ULong endpoint_count (void); + virtual CORBA::ULong endpoint_count (void) = 0; // returns the number of endpoints this acceptor is listening on. This // is used for determining how many profiles will be generated // for this acceptor. @@ -327,7 +327,7 @@ public: TAO_Connector (CORBA::ULong tag); // default constructor. - virtual int preconnect (char *preconnections) = 0; + virtual int preconnect (const char *preconnections) = 0; // Initial set of connections to be established. virtual int open (TAO_Resource_Factory *trf, diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp index 2a8416a9c37..cf61080cb79 100644 --- a/TAO/tao/UIOP_Acceptor.cpp +++ b/TAO/tao/UIOP_Acceptor.cpp @@ -22,6 +22,7 @@ #include "tao/UIOP_Acceptor.h" #include "tao/UIOP_Profile.h" +#include "tao/MProfile.h" #include "tao/ORB_Core.h" #include "tao/Server_Strategy_Factory.h" #include "tao/GIOP.h" @@ -38,9 +39,9 @@ TAO_UIOP_Acceptor::TAO_UIOP_Acceptor (void) { } -TAO_Profile * +int TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile) + TAO_MProfile &mprofile) { ACE_UNIX_Addr new_address; @@ -48,26 +49,24 @@ TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, return 0; // we only make one - int count = mprofile->profile_count (); - if ((mprofile->size () - count) < 1) + int count = mprofile.profile_count (); + if ((mprofile.size () - count) < 1) { - if (mprofile->grow (count + 1) == -1) + if (mprofile.grow (count + 1) == -1) return -1; } - TAO_UIOP_Profile pfile; - ACE_NEW_RETURN (pfile + TAO_UIOP_Profile *pfile; + ACE_NEW_RETURN (pfile, TAO_UIOP_Profile (new_address, object_key), -1); - if (mprofile->give_profile (pfile) == -1) + if (mprofile.give_profile (pfile) == -1) return -1; return 0; } -} - int TAO_UIOP_Acceptor::is_collocated (const TAO_Profile* pfile) { @@ -81,7 +80,7 @@ TAO_UIOP_Acceptor::is_collocated (const TAO_Profile* pfile) if (this->base_acceptor_.acceptor ().get_local_addr (address) == -1) return 0; - // @@ Osssama: can you verify that this operator does the right thing? + // @@ Ossama: can you verify that this operator does the right thing? return profile->object_addr () == address; } @@ -110,6 +109,12 @@ TAO_UIOP_Acceptor::open (TAO_ORB_Core *orb_core, return 0; // Success } +CORBA::ULong +TAO_UIOP_Acceptor::endpoint_count (void) +{ + // @@ for now just assume one! + return 1; +} #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/tao/UIOP_Acceptor.h b/TAO/tao/UIOP_Acceptor.h index b40d76c6da7..ea8404c5b22 100644 --- a/TAO/tao/UIOP_Acceptor.h +++ b/TAO/tao/UIOP_Acceptor.h @@ -64,7 +64,7 @@ public: // initialize acceptor for this address. int create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile *&mprofile); + TAO_MProfile &mprofile); // create profile objects for this Acceptor using the SAP // (service access point) and object_key. @@ -74,6 +74,8 @@ public: virtual ACE_Event_Handler *acceptor (void); // Return the underlying acceptor object, ACE_Acceptor + CORBA::ULong endpoint_count (void); + // return the number of profiles this will generate private: TAO_UIOP_BASE_ACCEPTOR base_acceptor_; // the concrete acceptor, as a pointer to its base class. diff --git a/TAO/tao/UIOP_Connector.cpp b/TAO/tao/UIOP_Connector.cpp index b194db2b269..63058382fc1 100644 --- a/TAO/tao/UIOP_Connector.cpp +++ b/TAO/tao/UIOP_Connector.cpp @@ -94,8 +94,10 @@ TAO_UIOP_Connector::close (void) } int -TAO_UIOP_Connector::preconnect (char *preconnections) +TAO_UIOP_Connector::preconnect (const char *preconnects) { + char *preconnections = ACE_OS::strdup (preconnects); + #if 0 if (preconnections) { @@ -215,6 +217,9 @@ TAO_UIOP_Connector::preconnect (char *preconnections) } } #endif /* 0 */ + + ACE_OS::free (preconnections); + return successes; } diff --git a/TAO/tao/UIOP_Connector.h b/TAO/tao/UIOP_Connector.h index e4d462b0d43..9cada4279a0 100644 --- a/TAO/tao/UIOP_Connector.h +++ b/TAO/tao/UIOP_Connector.h @@ -71,7 +71,7 @@ public: int close (void); // Shutdown Connector bridge and concreate Connector. - int preconnect (char *preconnections); + int preconnect (const char *preconnections); // Initial set of connections to be established. int connect (TAO_Profile *profile, diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp index 44864877ae2..bda3677d7f9 100644 --- a/TAO/tao/params.cpp +++ b/TAO/tao/params.cpp @@ -28,8 +28,8 @@ TAO_ORB_Parameters::~TAO_ORB_Parameters (void) } int -TAO_ORB_Parameters::parse_endpoints (ACE_CString endpoints, - TAO_EndpointSet endpoints_list) +TAO_ORB_Parameters::parse_endpoints (ACE_CString &endpoints, + TAO_EndpointSet &endpoints_list) { // Parse the string into seperate endpoints, where `endpoints' is of // the form: @@ -54,8 +54,8 @@ TAO_ORB_Parameters::parse_endpoints (ACE_CString endpoints, { int endpoints_count = 1; - for (size_t i = 0; - i < ACE_static_cast (int, length); + for (int i = 0; + i < length; ++i) { if (endpoints[i] == endpoints_delimiter) @@ -83,7 +83,7 @@ TAO_ORB_Parameters::parse_endpoints (ACE_CString endpoints, // from the offset `begin' to the end of the string. begin += end + 1; - end = endpoints_list.find (endpoints_delimiter, begin); + end = endpoints.find (endpoints_delimiter, begin); } return 0; // Success diff --git a/TAO/tao/params.h b/TAO/tao/params.h index 22eead8c7ce..cdf75d9b6cd 100644 --- a/TAO/tao/params.h +++ b/TAO/tao/params.h @@ -35,7 +35,6 @@ class TAO_IOR_LookupTable; #endif /* ! __ACE_INLINE__ */ typedef ACE_Unbounded_Set<ACE_CString> TAO_EndpointSet; - typedef ACE_Unbounded_Set_Iterator<ACE_CString> TAO_EndpointSetIterator; class TAO_Export TAO_ORB_Parameters @@ -57,13 +56,13 @@ public: ~TAO_ORB_Parameters (void); // Destructor. - const endpoint_set &endpoints (void); int preconnects (ACE_CString &preconnects); + TAO_EndpointSet &preconnects (void); void add_preconnect (ACE_CString &preconnect); // Specifies the endpoints to pre-establish connections on. - const endpoint_set &endpoints (void); int endpoints (ACE_CString &endpoints); + TAO_EndpointSet &endpoints (void); void add_endpoint (ACE_CString &endpoint); // Specifies the endpoints on which this server is willing to // listen for requests. @@ -139,7 +138,7 @@ public: // Set/Get the Init Reference of an arbitrary ObjectID. private: - // Each "endpoint" is of the form: + // Each "endpoint" is of the form: // // protocol:V.v//addr1,addr2,...,addrN/ // @@ -147,15 +146,22 @@ private: // // protocol://addr1,addr2,...,addrN/ // - // where "V.v" is an optional version. All preconnect or endpoint - // strings should be of the above form(s). + // where "V.v" is an optional version. + // + // Multiple sets of endpoint may be seperated by a semi-colon `;'. + // For example: + // + // iiop://space:2001,odyssey:2010/;uiop://foo,bar/ + // + // All preconnect or endpoint strings should be of the above form(s). - int parse_endpoints (ACE_CString &endpoints, TAO_EndpointSet endpoints_list); + int parse_endpoints (ACE_CString &endpoints, + TAO_EndpointSet &endpoints_list); - endpoint_set preconnections_list_; + TAO_EndpointSet preconnects_list_; // List of endpoints used to pre-establish connections. - endpoint_set endpoints_list_; + TAO_EndpointSet endpoints_list_; // List of endpoints this server is willing to accept requests // on. diff --git a/TAO/tao/params.i b/TAO/tao/params.i index b96583d0b6e..7603b1b8e5a 100644 --- a/TAO/tao/params.i +++ b/TAO/tao/params.i @@ -20,7 +20,7 @@ TAO_ORB_Parameters::preconnects (ACE_CString &preconnects) return this->parse_endpoints (preconnects, this->preconnects_list_); } -ACE_INLINE const endpoint_set & +ACE_INLINE TAO_EndpointSet & TAO_ORB_Parameters::preconnects (void) { return this->preconnects_list_; @@ -38,7 +38,7 @@ TAO_ORB_Parameters::endpoints (ACE_CString &endpoints) return this->parse_endpoints (endpoints, this->endpoints_list_); } -ACE_INLINE const endpoint_set & +ACE_INLINE TAO_EndpointSet & TAO_ORB_Parameters::endpoints (void) { return this->endpoints_list_; |