diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-26 04:54:00 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-26 04:54:00 +0000 |
commit | 7da694d5e29158c5c4353003e65cb8bbc332dd5c (patch) | |
tree | 07d7f87f497e662d8a7fb6b58f7de6c05a3f48e3 | |
parent | b09a97d05aa5592354618a1253a53ca419239346 (diff) | |
download | ATCD-7da694d5e29158c5c4353003e65cb8bbc332dd5c.tar.gz |
ChangeLogTag:Tue Nov 25 20:49:24 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 17 | ||||
-rw-r--r-- | TAO/tao/corbacom.i | 5 | ||||
-rw-r--r-- | TAO/tao/decode.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/orbobj.cpp | 50 | ||||
-rw-r--r-- | TAO/tao/orbobj.h | 7 | ||||
-rw-r--r-- | TAO/tao/params.cpp | 36 | ||||
-rw-r--r-- | TAO/tao/params.h | 20 |
7 files changed, 29 insertions, 114 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 06fccb77a29..729b70969c5 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,20 @@ +Tue Nov 25 20:49:24 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * tao/orbobj.h: + * tao/orbobj.cpp: + * tao/params.h: + * tao/params.cpp: + Removed the parameters to specify the event service and schedule + service IOR, the naming service is working now so it can be + used. And the support in "resolve_initial_references". + + * tao/corbacom.i: + * tao/decode.cpp: + Reverted the previous change, but this time added proper + comments: the spec says that a Naming_var taking a <char*> is + *not* supposed to copy it. Hence the ObjRef decoder cannot + release the string it just read. + Mon Nov 24 20:40:47 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> * tao/corbacom.i: diff --git a/TAO/tao/corbacom.i b/TAO/tao/corbacom.i index 4a64e173eee..6e1aee23cd0 100644 --- a/TAO/tao/corbacom.i +++ b/TAO/tao/corbacom.i @@ -56,8 +56,11 @@ CORBA::String_var::~String_var (void) ACE_INLINE CORBA::String_var::String_var (char *p) - : ptr_ (CORBA::string_dup (p)) + : ptr_ (p) { + // NOTE: According to the CORBA spec this string must *not* be + // copied, but it is non-compliant to use it/release it in the + // calling code. // argument is consumed. p should never be NULL } diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index e01a804f817..c96d0612d1c 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -581,7 +581,13 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, // @@ (CJC) Does IIOP_Object duplicate 'type_hint' below so that // we can safely free it? It does now! objdata = new IIOP_Object (type_hint); - CORBA::string_free (type_hint); + + // @@ (coryan) The IIOP_Object created here has a String_var + // member to keep the string, this member is constructed + // using type_hint, at that time a plain (char*). Hence the + // string is *not* copied and it cannot be released, so the + // following line is commented out: + // CORBA::string_free (type_hint); IIOP::Profile *profile = &objdata->profile; diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp index ec58b79ebe5..63efbb0e3eb 100644 --- a/TAO/tao/orbobj.cpp +++ b/TAO/tao/orbobj.cpp @@ -460,60 +460,10 @@ CORBA_ORB::resolve_name_service (void) } CORBA_Object_ptr -CORBA_ORB::resolve_schedule_service (void) -{ - // First check to see if we've already initialized this. - if (this->schedule_service_ != CORBA_Object::_nil ()) - // @@ Someone please double-check this ;-) - return CORBA_Object::_duplicate (this->schedule_service_); - - char *schedule_service_ior = - TAO_ORB_Core_instance ()->orb_params ()->schedule_service_ior (); - - // Second, check to see if the user has give us a parameter on - // the command-line. - if (schedule_service_ior != 0) - { - CORBA::Environment env; - this->schedule_service_ = - this->string_to_object (schedule_service_ior, env); - } - - return this->schedule_service_; -} - -CORBA_Object_ptr -CORBA_ORB::resolve_event_service (void) -{ - // First check to see if we've already initialized this. - if (this->event_service_ != CORBA_Object::_nil ()) - // @@ Someone please double-check this ;-) - return CORBA_Object::_duplicate (this->event_service_); - - char *event_service_ior = - TAO_ORB_Core_instance ()->orb_params ()->event_service_ior (); - - // Second, check to see if the user has give us a parameter on - // the command-line. - if (event_service_ior != 0) - { - CORBA::Environment env; - this->event_service_ = - this->string_to_object (event_service_ior, env); - } - - return this->event_service_; -} - -CORBA_Object_ptr CORBA_ORB::resolve_initial_references (CORBA::String name) { if (ACE_OS::strcmp (name, "NameService") == 0) return this->resolve_name_service (); - if (ACE_OS::strcmp (name, "ScheduleService") == 0) - return this->resolve_schedule_service (); - if (ACE_OS::strcmp (name, "EventService") == 0) - return this->resolve_event_service (); else if (ACE_OS::strcmp (name, "RootPOA") == 0) return this->resolve_poa (); else diff --git a/TAO/tao/orbobj.h b/TAO/tao/orbobj.h index df7665782ac..1b360a9a850 100644 --- a/TAO/tao/orbobj.h +++ b/TAO/tao/orbobj.h @@ -145,13 +145,6 @@ private: CORBA_Object_ptr resolve_name_service (void); // Resolve the name service object reference. - // @@ TODO: This should go away once the NamingService is working. - CORBA_Object_ptr resolve_schedule_service (void); - // Resolve the scheduler service object reference. - - CORBA_Object_ptr resolve_event_service (void); - // Resolve the event service object reference. - CORBA_Object_ptr resolve_poa (void); // Resolve the POA. diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp index c3c6c526ef9..47898ec1df0 100644 --- a/TAO/tao/params.cpp +++ b/TAO/tao/params.cpp @@ -2,9 +2,7 @@ TAO_ORB_Parameters::TAO_ORB_Parameters (void) : name_service_ior_ (0), - name_service_port_ (0), - schedule_service_ior_ (0), - event_service_ior_ (0) + name_service_port_ (0) { } @@ -43,38 +41,6 @@ TAO_ORB_Parameters::name_service_ior (void) // Get the IOR of our name service. void -TAO_ORB_Parameters::schedule_service_ior (CORBA::String s) -{ - this->schedule_service_ior_ = s; -} - -// Set the IOR of our Schedule service. - -CORBA::String -TAO_ORB_Parameters::schedule_service_ior (void) -{ - return this->schedule_service_ior_; -} - -// Get the IOR of our schedule service. - -void -TAO_ORB_Parameters::event_service_ior (CORBA::String s) -{ - this->event_service_ior_ = s; -} - -// Set the IOR of our Schedule service. - -CORBA::String -TAO_ORB_Parameters::event_service_ior (void) -{ - return this->event_service_ior_; -} - -// Get the IOR of our event service. - -void TAO_ORB_Parameters::name_service_port (CORBA::UShort port) { this->name_service_port_ = port; diff --git a/TAO/tao/params.h b/TAO/tao/params.h index e12277c3ed3..83575093538 100644 --- a/TAO/tao/params.h +++ b/TAO/tao/params.h @@ -65,20 +65,6 @@ public: CORBA::UShort name_service_port (void); // Get the port of our name service. - // @@ TODO: This shouldn't be needed, they were added until the - // Naming Service works correctly. - CORBA::String schedule_service_ior (void); - // Get the IOR of the - - void schedule_service_ior (CORBA::String ns); - // Set the IOR of our schedule service. - - CORBA::String event_service_ior (void); - // Get the IOR of the event service - - void event_service_ior (CORBA::String ns); - // Set the IOR of our event service. - private: ACE_INET_Addr addr_; // host + port number we are listening on @@ -88,12 +74,6 @@ private: CORBA::UShort name_service_port_; // The port number of our configured Naming Service. - - CORBA::String schedule_service_ior_; - // The IOR of our configured Scheduling Service. - - CORBA::String event_service_ior_; - // The IOR of our configured Event Service. }; typedef enum |