diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-12-05 12:35:34 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-12-05 12:35:34 +0000 |
commit | a05a1f8101e8ec535d307c2e1be617ea40372f1f (patch) | |
tree | 09ae9a9174001fa9f5bec3f9b2128be5a82a804a | |
parent | 1ac020dd20ec5d0d62967ae5d2be49e4fc36f334 (diff) | |
download | ATCD-a05a1f8101e8ec535d307c2e1be617ea40372f1f.tar.gz |
Mon Dec 5 12:32:50 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/Containers/Container_Base_T.cpp:
Removed some commented out code and use a switch instead of an if
* ciao/Deployment/Handlers/CIAO_Handler_Common.cpp:
Removed return statement which we never could reach
* ciao/Servants/Session/Servant_Impl_T.cpp:
Some code restructuring
* ciao/Valuetype_Factories/ConfigValue.cpp:
Small performance increase
* examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp:
Fixed memory leak
-rw-r--r-- | CIAO/ChangeLog | 16 | ||||
-rw-r--r-- | CIAO/ciao/Containers/Container_Base_T.cpp | 17 | ||||
-rw-r--r-- | CIAO/ciao/Deployment/Handlers/CIAO_Handler_Common.cpp | 2 | ||||
-rw-r--r-- | CIAO/ciao/Servants/Session/Servant_Impl_T.cpp | 15 | ||||
-rw-r--r-- | CIAO/ciao/Valuetype_Factories/ConfigValue.cpp | 5 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ConditionManager.cpp | 2 | ||||
-rw-r--r-- | CIAO/examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp | 4 |
7 files changed, 35 insertions, 26 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 0e0e6e9c1d3..5122b7977ef 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,19 @@ +Mon Dec 5 12:32:50 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Containers/Container_Base_T.cpp: + Removed some commented out code and use a switch instead of an if + + * ciao/Deployment/Handlers/CIAO_Handler_Common.cpp: + Removed return statement which we never could reach + + * ciao/Servants/Session/Servant_Impl_T.cpp: + Some code restructuring + + * ciao/Valuetype_Factories/ConfigValue.cpp: + Small performance increase + + * examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp: + Fixed memory leak Local Variables: mode: change-log diff --git a/CIAO/ciao/Containers/Container_Base_T.cpp b/CIAO/ciao/Containers/Container_Base_T.cpp index fae1812ae4f..7bfc1557bf7 100644 --- a/CIAO/ciao/Containers/Container_Base_T.cpp +++ b/CIAO/ciao/Containers/Container_Base_T.cpp @@ -17,7 +17,6 @@ namespace CIAO PortableServer::POA_ptr root_poa) : orb_ (::CORBA::ORB::_duplicate (o)), root_poa_ (::PortableServer::POA::_duplicate (root_poa)) - //, sa_ (0) { } @@ -30,7 +29,6 @@ namespace CIAO void Container_i<BASE>::fini (void) { - ::PortableServer::POA_var comp_poa_safe = this->component_poa_._retn (); if (! CORBA::is_nil (comp_poa_safe.in ())) @@ -95,14 +93,15 @@ namespace CIAO PortableServer::POA_var poa_safe; - if (t == Container_Types::COMPONENT_t || - t == Container_Types::HOME_t) - { - poa_safe = PortableServer::POA::_duplicate(this->component_poa_.in ()); - } - else + switch (t) { - poa_safe = PortableServer::POA::_duplicate(this->facet_cons_poa_.in ()); + case Container_Types::COMPONENT_t: + case Container_Types::HOME_t: + poa_safe = PortableServer::POA::_duplicate(this->component_poa_.in ()); + break; + default: + poa_safe = PortableServer::POA::_duplicate(this->facet_cons_poa_.in ()); + break; } PortableServer::ObjectId_var tmp_id = poa_safe->activate_object (p); diff --git a/CIAO/ciao/Deployment/Handlers/CIAO_Handler_Common.cpp b/CIAO/ciao/Deployment/Handlers/CIAO_Handler_Common.cpp index f1ea6cfc72d..243a447cd40 100644 --- a/CIAO/ciao/Deployment/Handlers/CIAO_Handler_Common.cpp +++ b/CIAO/ciao/Deployment/Handlers/CIAO_Handler_Common.cpp @@ -45,9 +45,9 @@ namespace CIAO "Component_Handler_i::get_implementation - " "Unable to locate artifact <%C>\n", name)); + throw ::Deployment::PlanError (name, "Nonexistent artifact"); - return 0; } void diff --git a/CIAO/ciao/Servants/Session/Servant_Impl_T.cpp b/CIAO/ciao/Servants/Session/Servant_Impl_T.cpp index 32066508613..0c86feeb24b 100644 --- a/CIAO/ciao/Servants/Session/Servant_Impl_T.cpp +++ b/CIAO/ciao/Servants/Session/Servant_Impl_T.cpp @@ -46,7 +46,6 @@ namespace CIAO typename CONTEXT> Session_Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::~Session_Servant_Impl (void) { - //TODO: thread safe? How? if (this->executor_->_refcount_value () > 1) { CIAO_ERROR (1, @@ -112,12 +111,12 @@ namespace CIAO ::Components::SessionContext_var sc = ::Components::SessionContext::_narrow (this->context_); - if (! ::CORBA::is_nil (sc.in ())) + if (::CORBA::is_nil (sc.in ())) { - return sc->get_CCM_object (); + throw ::CORBA::INTERNAL (); } - throw ::CORBA::INTERNAL (); + return sc->get_CCM_object (); } // CIAO-specific operations. @@ -188,14 +187,12 @@ namespace CIAO ::Components::SessionComponent_var temp = ::Components::SessionComponent::_narrow (this->executor_.in ()); - if (! ::CORBA::is_nil (temp.in ())) - { - temp->ccm_remove (); - } - else + if (::CORBA::is_nil (temp.in ())) { throw ::CORBA::INTERNAL (); } + + temp->ccm_remove (); } } diff --git a/CIAO/ciao/Valuetype_Factories/ConfigValue.cpp b/CIAO/ciao/Valuetype_Factories/ConfigValue.cpp index 3e5c02f15d9..17eaa33db93 100644 --- a/CIAO/ciao/Valuetype_Factories/ConfigValue.cpp +++ b/CIAO/ciao/Valuetype_Factories/ConfigValue.cpp @@ -15,11 +15,8 @@ namespace CIAO ConfigValue_impl::ConfigValue_impl(const char* the_name, const CORBA::Any& the_value) - : OBV_Components::ConfigValue() + : OBV_Components::ConfigValue(the_name, the_value) { - CORBA::Any any = the_value; - name (the_name); - value (any); } CORBA::ValueBase* ConfigValue_impl::_copy_value() diff --git a/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp b/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp index 2bdd6e9bbd7..ac668fbdc69 100644 --- a/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp +++ b/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp @@ -440,7 +440,7 @@ namespace CIAO } } } - // Now we can savely remove the read condition (in a thread safe manner) + // Now we can safely remove the read condition (in a thread safe manner) if (! ::CORBA::is_nil (this->rd_condition_.in ())) { retcode = ::DDS::RETCODE_OK; diff --git a/CIAO/examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp b/CIAO/examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp index eef2a8b6a61..2c4c3bbfb38 100644 --- a/CIAO/examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp +++ b/CIAO/examples/DevGuideExamples/Messenger/Messenger_exec_i.cpp @@ -100,9 +100,9 @@ namespace CIAO_Messenger_Impl } void - Messenger_exec_i::subject ( const char* subject) + Messenger_exec_i::subject (const char* subject) { - this->subject_ = CORBA::string_dup( subject ); + this->subject_ = subject; } // Port operations. |