diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-12-13 21:01:33 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-12-13 21:01:33 +0000 |
commit | a2932996ee3ac6794a091933a928fdf59fb3a517 (patch) | |
tree | b8336c9b319b42204150989f977cfbd3633509af /TAO/orbsvcs/orbsvcs/Naming | |
parent | dec7657286d73f83184e23ae15b4bdc358b9c481 (diff) | |
download | ATCD-a2932996ee3ac6794a091933a928fdf59fb3a517.tar.gz |
ChangeLogTag:Fri Dec 13 12:52:31 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Naming')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp index d532a2219c4..15af452cae3 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp @@ -2,7 +2,7 @@ // ============================================================================ // // = LIBRARY -// cos +// TAO_CosNaming // // = FILENAME // Hash_Naming_Context.cpp @@ -12,16 +12,24 @@ // Sergio Flores-Gaitan <sergio@cs.wustl.edu> // // ============================================================================ + #include "Hash_Naming_Context.h" #include "nsconf.h" #include "ace/Auto_Ptr.h" -ACE_RCSID(Naming, Hash_Naming_Context, "$Id$") +ACE_RCSID (Naming, + Hash_Naming_Context, + "$Id$") + + +// ------------------------------------------------- TAO_Bindings_Map::~TAO_Bindings_Map (void) { } +// ------------------------------------------------- + TAO_Hash_Naming_Context::TAO_Hash_Naming_Context (PortableServer::POA_ptr poa, const char *poa_id) : context_ (0), @@ -357,21 +365,19 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n // Stores the binding type for the first name component. CosNaming::BindingType type; + // Stores the object reference bound to the first name component. - CORBA::Object_ptr obj = CORBA::Object::_nil (); + CORBA::Object_var result; if (this->context_->find (n[0].id, n[0].kind, - obj, + result.out (), type) == -1) ACE_THROW_RETURN (CosNaming::NamingContext::NotFound (CosNaming::NamingContext::missing_node, n), CORBA::Object::_nil ()); - // Store the value in var to avoid memory leaks. - CORBA::Object_var result = obj; - // If the name we have to resolve is a compound name, we need to // resolve it recursively. if (name_len > 1) @@ -384,7 +390,7 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n // Narrow to NamingContext. context = CosNaming::NamingContext::_narrow (result.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (result._retn ()); + ACE_CHECK_RETURN (CORBA::Object::_nil ()); } else // The first name component wasn't bound to a NamingContext. @@ -515,7 +521,10 @@ TAO_Hash_Naming_Context::bind_new_context (const CosNaming::Name& n result->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK_EX(DESTROY); } - ACE_CATCHANY {} ACE_ENDTRY; + ACE_CATCHANY + { + } + ACE_ENDTRY; } // Re-raise the exception in bind_context() ACE_RE_THROW; |