diff options
Diffstat (limited to 'TAO/tao/Valuetype/ValueBase.cpp')
-rw-r--r-- | TAO/tao/Valuetype/ValueBase.cpp | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp index d7c325203d8..b7496f3e6cb 100644 --- a/TAO/tao/Valuetype/ValueBase.cpp +++ b/TAO/tao/Valuetype/ValueBase.cpp @@ -5,8 +5,8 @@ #include "tao/AnyTypeCode/Value_TypeCode_Static.h" #include "tao/AnyTypeCode/TypeCode_Constants.h" -#include "tao/Valuetype/ValueBase.h" -#include "tao/Valuetype/ValueFactory.h" +#include "ValueBase.h" +#include "ValueFactory.h" #include "tao/CDR.h" #include "tao/ORB.h" @@ -15,7 +15,7 @@ #include "ace/OS_NS_string.h" #if !defined (__ACE_INLINE__) -# include "tao/Valuetype/ValueBase.inl" +# include "ValueBase.inl" #endif /* ! __ACE_INLINE__ */ @@ -24,8 +24,6 @@ ACE_RCSID (Valuetype, "$Id$") -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - // Static operations in namespace CORBA. void @@ -175,6 +173,7 @@ CORBA::ValueBase::_tao_unmarshal (TAO_InputCDR &strm, // new_object->_tao_unmarshal_v () // new_object->_tao_unmarshal_post () +// CORBA::ValueBase *base = 0; CORBA::ValueFactory_var factory; CORBA::Boolean retval = CORBA::ValueBase::_tao_unmarshal_pre (strm, @@ -193,14 +192,14 @@ CORBA::ValueBase::_tao_unmarshal (TAO_InputCDR &strm, if (new_object == 0) { - return false; // %! except.? + return 0; // %! except.? } retval = new_object->_tao_unmarshal_v (strm); if (retval == 0) { - return false; + return 0; } } @@ -240,7 +239,7 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, if (TAO_OBV_GIOP_Flags::is_null_ref (value_tag)) { valuetype = 0; - return true; + return 1; // ok, null reference unmarshaled } // 2. Now at this point it must be a <value-tag> (error else). @@ -285,11 +284,11 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, { CORBA::String_var repo_id_stream; - CORBA::ULong length = 0; + CORBA::ULong length; if (!strm.read_ulong (length)) { - return false; + return 0; } // 'length' may not be the repo id length - it could be the @@ -301,7 +300,7 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, // Read the negative byte offset if (!strm.read_long (offset) || offset >= 0) { - return false; + return 0; } // Cribbed from tc_demarshal_indirection in Typecode_CDR_Extraction.cpp @@ -311,7 +310,7 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, if (!indir_stream.good_bit ()) { - return false; + return 0; } indir_stream.read_string(repo_id_stream.inout ()); @@ -325,7 +324,7 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, 0); if (!strm.read_char_array (repo_id_stream.inout (), length)) { - return false; + return 0; } } else if (length == 0) @@ -337,7 +336,7 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, } else { - return false; + return 0; } } @@ -345,17 +344,11 @@ CORBA::ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, orb_core->orb ()->lookup_value_factory (repo_id_stream.in ()); } - if (factory == 0) + if (factory == 0) // %! except.! { - if (TAO_debug_level > 0) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%N:%l) ERROR: OBV factory is null for <%s>!\n"), - repo_id)); - } - ACE_THROW_RETURN (CORBA::MARSHAL (CORBA::OMGVMCID | 1, - CORBA::COMPLETED_MAYBE), - false); + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("(%N:%l) OBV factory is null !!!\n"))); + return false; } return retval; @@ -616,5 +609,3 @@ namespace TAO CORBA::remove_ref (p); } } - -TAO_END_VERSIONED_NAMESPACE_DECL |