diff options
Diffstat (limited to 'TAO/tao/IORManipulation/IORManipulation.cpp')
-rw-r--r-- | TAO/tao/IORManipulation/IORManipulation.cpp | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/TAO/tao/IORManipulation/IORManipulation.cpp b/TAO/tao/IORManipulation/IORManipulation.cpp index 079f942eee2..3bba59dba08 100644 --- a/TAO/tao/IORManipulation/IORManipulation.cpp +++ b/TAO/tao/IORManipulation/IORManipulation.cpp @@ -1,4 +1,4 @@ -#include "tao/IORManipulation/IORManipulation.h" +#include "IORManipulation.h" #include "tao/MProfile.h" #include "tao/Profile.h" @@ -13,7 +13,6 @@ ACE_RCSID (IORManipulation, IORManipulation, "$Id$") -TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_IOR_Manipulation_impl::TAO_IOR_Manipulation_impl (void) { @@ -184,15 +183,17 @@ TAO_IOR_Manipulation_impl::remove_profiles ( ACE_THROW_RETURN (TAO_IOP::Invalid_IOR (), CORBA::Object::_nil ()); - // We are done with add_profiles. - // At this point, we don't do remove_profiles() - // immediately like before, - // because it could result in an - // Object Reference with 0 profile. And it would not pass - // the CORBA::is_nil() evaluation. - // Instead, we create the Object Reference right here, which is - // earlier than before.(Actually, I just moved some code - // from below up to here). + ACE_AUTO_PTR_RESET (tmp_pfiles, + ior2->_stubobj ()->make_profiles (), + TAO_MProfile); + + if (Diff_Profiles.remove_profiles (tmp_pfiles.get ()) < 0) + ACE_THROW_RETURN (TAO_IOP::NotFound (), + CORBA::Object::_nil ()); + + // MS C++ knows nothing about reset! + // tmp_pfiles.reset (0); // get rid of last MProfile + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); TAO_Stub *stub = orb_core->create_stub (id.in (), // give the id string @@ -223,20 +224,6 @@ TAO_IOR_Manipulation_impl::remove_profiles ( CORBA::Object::_nil ()); } - // Now we can remove the profiles which we want to elimitate from - // the Object. - ACE_AUTO_PTR_RESET (tmp_pfiles, - ior2->_stubobj ()->make_profiles (), - TAO_MProfile); - - TAO_MProfile& mp = stub -> base_profiles(); - if (mp.remove_profiles (tmp_pfiles.get ()) < 0) - ACE_THROW_RETURN (TAO_IOP::NotFound (), - CORBA::Object::_nil ()); - - // MS C++ knows nothing about reset! - // tmp_pfiles.reset (0); // get rid of last MProfile - return new_obj._retn (); } @@ -379,4 +366,3 @@ TAO_IOR_Manipulation_impl::get_profile_count ( return count; } -TAO_END_VERSIONED_NAMESPACE_DECL |