diff options
| author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-03-16 08:34:12 +0000 |
|---|---|---|
| committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-03-16 08:34:12 +0000 |
| commit | 34d23d8974e8c901aed247f738d4a1da90df66b5 (patch) | |
| tree | 72d69dbbb0bab5e66b57022feed1cbd2d4bf0c30 /TAO | |
| parent | e2f4ae47b73957a27e12a485d9706ed3cbc35086 (diff) | |
| download | ATCD-34d23d8974e8c901aed247f738d4a1da90df66b5.tar.gz | |
Mon Mar 16 08:34:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/Exclusive_TMS.h:
* tao/Muxed_TMS.h:
Added forward declaration
* tao/Policy_Set.cpp:
Layout changes
* tao/Profile.cpp:
Fixed 64bit issue, use operator!
* tao/Synch_Invocation.cpp:
* tao/RTPortableServer/RT_Servant_Dispatcher.cpp:
Use operator!
Diffstat (limited to 'TAO')
| -rw-r--r-- | TAO/ChangeLog | 16 | ||||
| -rw-r--r-- | TAO/tao/Exclusive_TMS.h | 1 | ||||
| -rw-r--r-- | TAO/tao/Muxed_TMS.h | 1 | ||||
| -rw-r--r-- | TAO/tao/Policy_Set.cpp | 28 | ||||
| -rw-r--r-- | TAO/tao/Profile.cpp | 11 | ||||
| -rw-r--r-- | TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp | 7 | ||||
| -rw-r--r-- | TAO/tao/Synch_Invocation.cpp | 2 |
7 files changed, 38 insertions, 28 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index aa13261ca59..fc173960d0d 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,19 @@ +Mon Mar 16 08:34:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/Exclusive_TMS.h: + * tao/Muxed_TMS.h: + Added forward declaration + + * tao/Policy_Set.cpp: + Layout changes + + * tao/Profile.cpp: + Fixed 64bit issue, use operator! + + * tao/Synch_Invocation.cpp: + * tao/RTPortableServer/RT_Servant_Dispatcher.cpp: + Use operator! + Mon Mar 16 08:26:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> * tests/RTCORBA/Client_Propagated/run_test.pl: diff --git a/TAO/tao/Exclusive_TMS.h b/TAO/tao/Exclusive_TMS.h index 439da9cfd1e..27f6fdb7f34 100644 --- a/TAO/tao/Exclusive_TMS.h +++ b/TAO/tao/Exclusive_TMS.h @@ -25,6 +25,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_Pluggable_Reply_Params; +class TAO_Reply_Dispatcher; /** * @class TAO_Exclusive_TMS diff --git a/TAO/tao/Muxed_TMS.h b/TAO/tao/Muxed_TMS.h index 64de055f306..c9affde3619 100644 --- a/TAO/tao/Muxed_TMS.h +++ b/TAO/tao/Muxed_TMS.h @@ -30,6 +30,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_ORB_Core; class TAO_Pluggable_Reply_Params; +class TAO_Reply_Dispatcher; /** * @class TAO_Muxed_TMS diff --git a/TAO/tao/Policy_Set.cpp b/TAO/tao/Policy_Set.cpp index 67397ac0086..afbc6ae3489 100644 --- a/TAO/tao/Policy_Set.cpp +++ b/TAO/tao/Policy_Set.cpp @@ -57,22 +57,18 @@ TAO_Policy_Set::TAO_Policy_Set (const TAO_Policy_Set &rhs) continue; } - CORBA::Policy_var copy = - policy->copy (); + CORBA::Policy_var copy = policy->copy (); - TAO_Cached_Policy_Type const cached_type = - copy->_tao_cached_type (); + TAO_Cached_Policy_Type const cached_type = copy->_tao_cached_type (); // Add the "cacheable" policies into the cache. - if (cached_type != TAO_CACHED_POLICY_UNCACHED - && cached_type >= 0) + if (cached_type != TAO_CACHED_POLICY_UNCACHED && cached_type >= 0) { this->cached_policies_[cached_type] = copy.ptr (); } this->policy_list_[i] = copy._retn (); } - } catch (const ::CORBA::Exception& ex) { @@ -108,8 +104,7 @@ TAO_Policy_Set::copy_from (TAO_Policy_Set *source) throw ::CORBA::NO_PERMISSION (); } - CORBA::Policy_var copy = - policy->copy (); + CORBA::Policy_var copy = policy->copy (); CORBA::ULong const length = this->policy_list_.length (); this->policy_list_.length (length + 1); @@ -310,15 +305,12 @@ TAO_Policy_Set::get_policy (CORBA::PolicyType type) for (CORBA::ULong i = 0; i < length; ++i) { - const CORBA::ULong current = - this->policy_list_[i]->policy_type (); + CORBA::PolicyType const current = this->policy_list_[i]->policy_type (); - if (current != type) + if (current == type) { - continue; + return CORBA::Policy::_duplicate (this->policy_list_[i]); } - - return CORBA::Policy::_duplicate (this->policy_list_[i]); } return CORBA::Policy::_nil (); @@ -327,8 +319,7 @@ TAO_Policy_Set::get_policy (CORBA::PolicyType type) CORBA::Policy_ptr TAO_Policy_Set::get_cached_const_policy (TAO_Cached_Policy_Type type) const { - if (type != TAO_CACHED_POLICY_UNCACHED - && type < TAO_CACHED_POLICY_MAX_CACHED) + if (type != TAO_CACHED_POLICY_UNCACHED && type < TAO_CACHED_POLICY_MAX_CACHED) { return this->cached_policies_[type]; } @@ -339,8 +330,7 @@ TAO_Policy_Set::get_cached_const_policy (TAO_Cached_Policy_Type type) const CORBA::Policy_ptr TAO_Policy_Set::get_cached_policy (TAO_Cached_Policy_Type type) { - if (type != TAO_CACHED_POLICY_UNCACHED - && type < TAO_CACHED_POLICY_MAX_CACHED) + if (type != TAO_CACHED_POLICY_UNCACHED && type < TAO_CACHED_POLICY_MAX_CACHED) { return CORBA::Policy::_duplicate (this->cached_policies_[type]); } diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index e98aefca50a..8ba9610b403 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -355,7 +355,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list) // This loop iterates through CORBA::PolicyList to convert // each CORBA::Policy into a CORBA::PolicyValue - size_t const plen = policy_list->length (); + CORBA::ULong const plen = policy_list->length (); policy_value_seq.length (plen); @@ -390,8 +390,11 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list) IOP::TaggedComponent tagged_component; tagged_component.tag = Messaging::TAG_POLICIES; - out_cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER); - out_cdr << policy_value_seq; + if (!(out_cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))) + return; + + if (!(out_cdr << policy_value_seq)) + return; length = out_cdr.total_length (); @@ -439,7 +442,7 @@ TAO_Profile::get_policies (CORBA::PolicyList& pl) if (!(in_cdr >> ACE_InputCDR::to_boolean (byte_order))) { - return ; + return; } in_cdr.reset_byte_order (static_cast <int> (byte_order)); diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp index 63f2b2ff519..06a9054a1f9 100644 --- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp +++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp @@ -41,8 +41,7 @@ TAO_RT_Servant_Dispatcher::pre_invoke_remote_request ( TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state ) { - TAO_Service_Context &request_service_context = - req.request_service_context (); + TAO_Service_Context &request_service_context = req.request_service_context (); TAO_Service_Context &reply_service_context = req.reply_service_context (); TAO_Thread_Pool *thread_pool = @@ -115,11 +114,11 @@ TAO_RT_Servant_Dispatcher::pre_invoke_remote_request ( (context->context_data.get_buffer ()), context->context_data.length ()); CORBA::Boolean byte_order; - if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) + if (!(cdr >> ACE_InputCDR::to_boolean (byte_order))) throw ::CORBA::MARSHAL (); cdr.reset_byte_order (static_cast<int> (byte_order)); - if ((cdr >> target_priority) == 0) + if (!(cdr >> target_priority)) throw ::CORBA::MARSHAL (); // Save the target priority in the response service diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 12847baf599..dab407a556f 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -525,7 +525,7 @@ namespace TAO CORBA::ULong minor = 0; CORBA::ULong completion = 0; - if ((cdr >> minor) == 0 || (cdr >> completion) == 0) + if (!(cdr >> minor) || !(cdr >> completion)) { throw ::CORBA::MARSHAL (0, CORBA::COMPLETED_MAYBE); } |
