diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-05-02 13:33:04 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-05-02 13:33:04 +0000 |
commit | a567114ae197582a9b8ad27f15e69b6aff59b1bb (patch) | |
tree | adefbe60bad5109898072ea18c7061f09b4b4e74 | |
parent | 6cc88c83550be0cff011351623e5de38dafa35b7 (diff) | |
download | ATCD-a567114ae197582a9b8ad27f15e69b6aff59b1bb.tar.gz |
Wed May 2 13:26:37 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 16 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/Enum_TypeCode.h | 3 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/Struct_TypeCode.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/Struct_TypeCode.h | 3 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/skip.cpp | 50 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInfo.cpp | 22 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp | 46 | ||||
-rw-r--r-- | TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp | 47 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Root_POA.cpp | 15 |
10 files changed, 89 insertions, 119 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 6de210a9613..3bc3c88fcc7 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,19 @@ +Wed May 2 13:26:37 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/AnyTypeCode/Enum_TypeCode.h: + * tao/AnyTypeCode/skip.cpp: + * tao/AnyTypeCode/Struct_TypeCode.cpp: + * tao/AnyTypeCode/Struct_TypeCode.h: + * tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp: + * tao/IORInterceptor/IORInfo.cpp: + * tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp: + Layout changes + + * tao/Messaging/AMI_Arguments_Converter_Impl.cpp: + Extended to also handle exceptions in the server request + + * tao/PortableServer/Root_POA.cpp: + Layout changes and zapped some intermediate variables Mon Apr 30 08:59:37 CDT 2007 Chad Elliott <elliott_c@ociweb.com> diff --git a/TAO/tao/AnyTypeCode/Enum_TypeCode.h b/TAO/tao/AnyTypeCode/Enum_TypeCode.h index 13020e87c38..7fc3d12c0f2 100644 --- a/TAO/tao/AnyTypeCode/Enum_TypeCode.h +++ b/TAO/tao/AnyTypeCode/Enum_TypeCode.h @@ -64,8 +64,7 @@ namespace TAO * @see @c CORBA::TypeCode */ //@{ - virtual bool tao_marshal (TAO_OutputCDR & cdr, - CORBA::ULong offset) const; + virtual bool tao_marshal (TAO_OutputCDR & cdr, CORBA::ULong offset) const; virtual void tao_duplicate (void); virtual void tao_release (void); //@} diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp index b299ab6947b..9e14682e7be 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp @@ -195,8 +195,7 @@ CORBA::TypeCode_ptr TAO::TypeCode::Struct<StringType, TypeCodeType, FieldArrayType, - RefCountPolicy>::get_compact_typecode_i ( - void) const + RefCountPolicy>::get_compact_typecode_i (void) const { ACE_Array_Base<Struct_Field<CORBA::String_var, CORBA::TypeCode_var> > diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode.h b/TAO/tao/AnyTypeCode/Struct_TypeCode.h index 16405c3747b..422b6b3fdf8 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode.h +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode.h @@ -73,8 +73,7 @@ namespace TAO * @see @c CORBA::TypeCode */ //@{ - virtual bool tao_marshal (TAO_OutputCDR & cdr, - CORBA::ULong offset) const; + virtual bool tao_marshal (TAO_OutputCDR & cdr, CORBA::ULong offset) const; virtual void tao_duplicate (void); virtual void tao_release (void); //@} diff --git a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp index cd6a5735295..7b6a793b2bb 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp @@ -1402,8 +1402,7 @@ namespace // ---------------------------------------------------------------- CORBA::Boolean -operator>> (TAO_InputCDR & cdr, - CORBA::TypeCode_ptr & tc) +operator>> (TAO_InputCDR & cdr, CORBA::TypeCode_ptr & tc) { TAO::TypeCodeFactory::TC_Info_List infos; diff --git a/TAO/tao/AnyTypeCode/skip.cpp b/TAO/tao/AnyTypeCode/skip.cpp index f6efd973716..c8c4c2ecab8 100644 --- a/TAO/tao/AnyTypeCode/skip.cpp +++ b/TAO/tao/AnyTypeCode/skip.cpp @@ -533,9 +533,7 @@ TAO_Marshal_Union::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *src) // Good, use the default to append... CORBA::TypeCode_var member_tc = tc->member_type (default_member); - return TAO_Marshal_Object::perform_skip (member_tc.in (), - src - ); + return TAO_Marshal_Object::perform_skip (member_tc.in (), src); } // If we're here, we have an implicit default case, and we @@ -548,9 +546,7 @@ TAO_Marshal_Union::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *src) CORBA::TypeCode_var member_tc = tc->member_type (current_member); - return TAO_Marshal_Object::perform_skip (member_tc.in (), - src - ); + return TAO_Marshal_Object::perform_skip (member_tc.in (), src); } TAO::traverse_status @@ -609,7 +605,7 @@ TAO_Marshal_Sequence::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) // For CORBA basic types, the skip can be optimized CORBA::TCKind const kind = tc2->kind (); - char *dummy; + char *dummy = 0; switch (kind) { case CORBA::tk_octet: @@ -660,9 +656,7 @@ TAO_Marshal_Sequence::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) while (bounds-- && continue_skipping) { continue_skipping = - TAO_Marshal_Object::perform_skip (tc2.in (), - stream - ); + TAO_Marshal_Object::perform_skip (tc2.in (), stream); } break; }// end of switch @@ -679,9 +673,7 @@ TAO_Marshal_Sequence::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) } TAO::traverse_status -TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc, - TAO_InputCDR *stream - ) +TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) { CORBA::Boolean continue_skipping = true; @@ -746,9 +738,7 @@ TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc, while (bounds-- && continue_skipping) { int stop = - TAO_Marshal_Object::perform_skip (tc2.in (), - stream - ); + TAO_Marshal_Object::perform_skip (tc2.in (), stream); if (stop == TAO::TRAVERSE_STOP) continue_skipping = false; } @@ -767,9 +757,7 @@ TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc, } TAO::traverse_status -TAO_Marshal_Alias::skip (CORBA::TypeCode_ptr tc, - TAO_InputCDR *stream - ) +TAO_Marshal_Alias::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) { // Typecode of the aliased type. CORBA::TypeCode_var tc2; @@ -781,9 +769,7 @@ TAO_Marshal_Alias::skip (CORBA::TypeCode_ptr tc, tc2 = tc->content_type (); - retval = TAO_Marshal_Object::perform_skip (tc2.in (), - stream - ); + retval = TAO_Marshal_Object::perform_skip (tc2.in (), stream); // tc2->_decr_refcnt (); if (retval == TAO::TRAVERSE_CONTINUE @@ -805,9 +791,7 @@ TAO_Marshal_Alias::skip (CORBA::TypeCode_ptr tc, // // NOTE: This is asymmetric with respect to encoding exceptions. TAO::traverse_status -TAO_Marshal_Except::skip (CORBA::TypeCode_ptr tc, - TAO_InputCDR *stream - ) +TAO_Marshal_Except::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) { TAO::traverse_status retval = TAO::TRAVERSE_CONTINUE; @@ -827,9 +811,7 @@ TAO_Marshal_Except::skip (CORBA::TypeCode_ptr tc, { param = tc->member_type (i); - retval = TAO_Marshal_Object::perform_skip (param.in (), - stream - ); + retval = TAO_Marshal_Object::perform_skip (param.in (), stream); } if (retval == TAO::TRAVERSE_CONTINUE) @@ -844,9 +826,7 @@ TAO_Marshal_Except::skip (CORBA::TypeCode_ptr tc, // decode wstring TAO::traverse_status -TAO_Marshal_WString::skip (CORBA::TypeCode_ptr, - TAO_InputCDR *stream - ) +TAO_Marshal_WString::skip (CORBA::TypeCode_ptr, TAO_InputCDR *stream) { CORBA::Boolean continue_skipping = true; @@ -872,9 +852,7 @@ TAO_Marshal_WString::skip (CORBA::TypeCode_ptr, } TAO::traverse_status -TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc, - TAO_InputCDR *stream - ) +TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *stream) { TAO::traverse_status retval = TAO::TRAVERSE_CONTINUE; CORBA::TypeCode_var param; @@ -983,9 +961,7 @@ TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc, { param = tc->member_type (i); - retval = TAO_Marshal_Object::perform_skip (param.in (), - stream - ); + retval = TAO_Marshal_Object::perform_skip (param.in (), stream); } if (retval == TAO::TRAVERSE_CONTINUE) diff --git a/TAO/tao/IORInterceptor/IORInfo.cpp b/TAO/tao/IORInterceptor/IORInfo.cpp index aca2830859c..6b4ee9765aa 100644 --- a/TAO/tao/IORInterceptor/IORInfo.cpp +++ b/TAO/tao/IORInterceptor/IORInfo.cpp @@ -27,8 +27,7 @@ TAO_IORInfo::~TAO_IORInfo (void) } CORBA::Policy_ptr -TAO_IORInfo::get_effective_policy (CORBA::PolicyType type - ) +TAO_IORInfo::get_effective_policy (CORBA::PolicyType type) { this->check_validity (); @@ -48,8 +47,7 @@ TAO_IORInfo::get_effective_policy (CORBA::PolicyType type } void -TAO_IORInfo::add_ior_component (const IOP::TaggedComponent &component - ) +TAO_IORInfo::add_ior_component (const IOP::TaggedComponent &component) { this->check_validity (); @@ -57,24 +55,20 @@ TAO_IORInfo::add_ior_component (const IOP::TaggedComponent &component throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); // Add the given tagged component to all profiles. - this->poa_->save_ior_component (component - ); + this->poa_->save_ior_component (component); } void TAO_IORInfo::add_ior_component_to_profile ( const IOP::TaggedComponent &component, - IOP::ProfileId profile_id - ) + IOP::ProfileId profile_id) { this->check_validity (); if (this->components_established_) throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); - this->poa_->save_ior_component_and_profile_id (component, - profile_id - ); + this->poa_->save_ior_component_and_profile_id (component, profile_id); } char * @@ -138,13 +132,11 @@ TAO_IORInfo::current_factory (void) void TAO_IORInfo::current_factory ( - PortableInterceptor::ObjectReferenceFactory * current_factory - ) + PortableInterceptor::ObjectReferenceFactory * current_factory) { this->check_validity (); - this->poa_->set_obj_ref_factory (current_factory - ); + this->poa_->set_obj_ref_factory (current_factory); } void diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp index 56728db7e70..eb5e80e269f 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp @@ -21,24 +21,17 @@ TAO_IORInterceptor_Adapter_Impl::~TAO_IORInterceptor_Adapter_Impl (void) void TAO_IORInterceptor_Adapter_Impl::add_interceptor ( - PortableInterceptor::IORInterceptor_ptr i - - ) + PortableInterceptor::IORInterceptor_ptr i) { - this->ior_interceptor_list_.add_interceptor (i - ); + this->ior_interceptor_list_.add_interceptor (i); } void TAO_IORInterceptor_Adapter_Impl::add_interceptor ( PortableInterceptor::IORInterceptor_ptr i, - const CORBA::PolicyList& policies - - ) + const CORBA::PolicyList& policies) { - this->ior_interceptor_list_.add_interceptor (i, - policies - ); + this->ior_interceptor_list_.add_interceptor (i, policies); } void @@ -50,11 +43,9 @@ TAO_IORInterceptor_Adapter_Impl::destroy_interceptors (void) } void -TAO_IORInterceptor_Adapter_Impl::establish_components ( - TAO_Root_POA* poa - ) +TAO_IORInterceptor_Adapter_Impl::establish_components (TAO_Root_POA* poa) { - const size_t interceptor_count = this->ior_interceptor_list_.size (); + size_t const interceptor_count = this->ior_interceptor_list_.size (); if (interceptor_count == 0) return; @@ -80,8 +71,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( try { this->ior_interceptor_list_.interceptor (i)->establish_components ( - info.in () - ); + info.in ()); } catch (const ::CORBA::Exception& ex) { @@ -93,8 +83,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( if (TAO_debug_level > 1) { CORBA::String_var name = - this->ior_interceptor_list_.interceptor (i)->name ( - ); + this->ior_interceptor_list_.interceptor (i)->name (); // @@ What do we do if we get an exception here? if (name.in () != 0) @@ -114,8 +103,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( tao_info->components_established (); - this->components_established (info.in () - ); + this->components_established (info.in ()); // The IORInfo instance is no longer valid. Invalidate it to // prevent the user from peforming "illegal" operations. @@ -124,8 +112,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( void TAO_IORInterceptor_Adapter_Impl::components_established ( - PortableInterceptor::IORInfo_ptr info - ) + PortableInterceptor::IORInfo_ptr info) { // Iterate over the registered IOR interceptors so that they may be // given the opportunity to add tagged components to the profiles @@ -146,9 +133,7 @@ TAO_IORInterceptor_Adapter_Impl::components_established ( PortableInterceptor::IORInterceptor_3_0::_narrow (ior_interceptor); if (!CORBA::is_nil (ior_3_interceptor.in ())) { - ior_3_interceptor->components_established ( - info - ); + ior_3_interceptor->components_established (info); } } catch (const ::CORBA::Exception&) @@ -162,8 +147,7 @@ TAO_IORInterceptor_Adapter_Impl::components_established ( void TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( const TAO::ObjectReferenceTemplate_Array &array_obj_ref_template, - PortableInterceptor::AdapterState state - ) + PortableInterceptor::AdapterState state) { const size_t interceptor_count = this->ior_interceptor_list_.size (); @@ -196,8 +180,7 @@ TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( { ior_3_interceptor->adapter_state_changed ( seq_obj_ref_template, - state - ); + state); } } } @@ -205,8 +188,7 @@ TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( void TAO_IORInterceptor_Adapter_Impl::adapter_manager_state_changed ( const char * id, - PortableInterceptor::AdapterState state - ) + PortableInterceptor::AdapterState state) { /// Whenever the POAManager state is changed, the /// adapter_manager_state_changed method is to be invoked on all the IOR diff --git a/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp b/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp index 18bf6b805ce..7b1e45d0993 100644 --- a/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp +++ b/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp @@ -56,22 +56,37 @@ TAO_AMI_Arguments_Converter_Impl::convert_reply ( size_t nargs) { if (server_request.operation_details ()->reply_dispatcher ()) - { - TAO_OutputCDR output; - for (CORBA::ULong j = 0; j < nargs; ++j) - { - if (!(args[j]->marshal (output))) - { - TAO_OutputCDR::throw_skel_exception (errno); - } - } - TAO_Pluggable_Reply_Params params (0); - TAO_InputCDR input (output); - params.input_cdr_ = &input; - params.reply_status_ = TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; - server_request.operation_details ()-> - reply_dispatcher ()->dispatch_reply (params); - } + { + TAO_OutputCDR output; + TAO_Pluggable_Reply_Params params (0); + if (server_request.caught_exception () == 0) + { + params.reply_status_ = TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; + for (CORBA::ULong j = 0; j < nargs; ++j) + { + if (!(args[j]->marshal (output))) + { + TAO_OutputCDR::throw_skel_exception (errno); + } + } + } + else + { + server_request.caught_exception ()->_tao_encode (output); + if (CORBA::SystemException::_downcast (server_request.caught_exception ()) != 0) + { + params.reply_status_ = TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION; + } + else + { + params.reply_status_ = TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION; + } + } + TAO_InputCDR input (output); + params.input_cdr_ = &input; + server_request.operation_details ()-> + reply_dispatcher ()->dispatch_reply (params); + } } // ********************************************************************* diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp index 2ee286db779..091a5c66dd1 100644 --- a/TAO/tao/PortableServer/Root_POA.cpp +++ b/TAO/tao/PortableServer/Root_POA.cpp @@ -481,10 +481,8 @@ TAO_Root_POA::create_POA_i (const TAO_Root_POA::String &adapter_name, // with the same parent POA. If the target POA already has a child // POA with the specified name, the AdapterAlreadyExists exception // is raised. - int result = this->children_.find (adapter_name); - // Child was found - if (result != -1) + if (this->children_.find (adapter_name) != -1) { throw PortableServer::POA::AdapterAlreadyExists (); } @@ -515,9 +513,7 @@ TAO_Root_POA::create_POA_i (const TAO_Root_POA::String &adapter_name, // Check for exception in construction of the POA. // Add to children map - result = this->children_.bind (adapter_name, - poa); - if (result != 0) + if (this->children_.bind (adapter_name, poa) != 0) { throw ::CORBA::OBJ_ADAPTER (); } @@ -570,8 +566,7 @@ TAO_Root_POA::find_POA_i (const ACE_CString &child_name, CORBA::Boolean activate_it) { TAO_Root_POA *child = 0; - int result = this->children_.find (child_name, - child); + int result = this->children_.find (child_name, child); #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) @@ -657,9 +652,7 @@ TAO_Root_POA::create_POA (const char *adapter_name, // Lock access for the duration of this transaction. TAO_POA_GUARD_RETURN (0); - return this->create_POA_i (adapter_name, - poa_manager, - policies); + return this->create_POA_i (adapter_name, poa_manager, policies); } #endif |