From a4bcbf3f57b81f0c26f93944b475af868f43db5b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 9 Apr 2010 13:35:16 +0000 Subject: Fri Apr 9 13:36:31 UTC 2010 Johnny Willemsen * ciao/Servants/Servant_Impl_Base.cpp: Throw CORBA::BAD_PARAM with 0 for string --- CIAO/ChangeLog | 5 +++++ CIAO/ciao/Servants/Servant_Impl_Base.cpp | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 386294df8e6..fd81a01c2d6 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 9 13:36:31 UTC 2010 Johnny Willemsen + + * ciao/Servants/Servant_Impl_Base.cpp: + Throw CORBA::BAD_PARAM with 0 for string + Fri Apr 9 12:49:53 UTC 2010 Marcel Smit * connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl: diff --git a/CIAO/ciao/Servants/Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Servant_Impl_Base.cpp index 58acc2c0802..565c553c885 100644 --- a/CIAO/ciao/Servants/Servant_Impl_Base.cpp +++ b/CIAO/ciao/Servants/Servant_Impl_Base.cpp @@ -16,13 +16,13 @@ namespace CIAO Servant_Impl_Base::~Servant_Impl_Base (void) { } - + void Servant_Impl_Base::remove (void) { CIAO_TRACE("Servant_Impl_Base::remove (void)"); #if !defined (CCM_LW) - + try { Components::ConsumerDescriptions_var consumers = @@ -54,7 +54,7 @@ namespace CIAO return; } #endif - + /// This call deactivates facets, removes executor and home /// servant (if any), and uninstalls us from the container. /// It has its own try/catch blocks. @@ -66,7 +66,7 @@ namespace CIAO Servant_Impl_Base::get_all_ports (void) { CIAO_TRACE("Servant_Impl_Base::get_all_ports (void)"); - + ::Components::ComponentPortDescription_var retv = this->Connector_Servant_Impl_Base::get_all_ports (); @@ -101,7 +101,7 @@ namespace CIAO Servant_Impl_Base::get_all_consumers (void) { CIAO_TRACE("Servant_Impl_Base::get_all_consumers (void)"); - + ::Components::ConsumerDescriptions *tmp = 0; ACE_NEW_THROW_EX (tmp, ::Components::ConsumerDescriptions ( @@ -129,10 +129,10 @@ namespace CIAO Servant_Impl_Base::get_consumer (const char *sink_name) { CIAO_TRACE("Servant_Impl_Base::get_consumer (const char *sink_name)"); - + if (sink_name == 0) { - throw ::Components::InvalidName (); + throw ::CORBA::BAD_PARAM (); } Components::EventConsumerBase_ptr retval = @@ -152,12 +152,12 @@ namespace CIAO const ::Components::NameList & names) { CIAO_TRACE("Servant_Impl_Base::get_named_consumers"); - + Components::ConsumerDescriptions *retval = 0; ACE_NEW_THROW_EX (retval, ::Components::ConsumerDescriptions, CORBA::NO_MEMORY ()); - + Components::ConsumerDescriptions_var safe_retval = retval; CORBA::ULong const len = names.length (); safe_retval->length (len); @@ -234,7 +234,7 @@ namespace CIAO (LM_TRACE, CLINFO "Servant_Impl_Base::get_all_receptacles - Escaped loop.\n")); - + return retval._retn (); } #endif @@ -265,7 +265,7 @@ namespace CIAO ::Components::EventConsumerBase_ptr port_ref) { CIAO_TRACE("Servant_Impl_Base::add_consumer"); - + if (0 == port_name || ::CORBA::is_nil (port_ref)) { CIAO_ERROR (1, @@ -273,7 +273,7 @@ namespace CIAO CLINFO "Servant_Impl_Base::add_consumer - Bad port name [%C] or bad objref\n", port_name)); - + throw ::CORBA::BAD_PARAM (); return; } @@ -305,7 +305,7 @@ namespace CIAO Servant_Impl_Base::lookup_consumer (const char *port_name) { CIAO_TRACE("Servant_Impl_Base::lookup_consumer"); - + #if !defined (CCM_LW) if (0 == port_name) { @@ -328,7 +328,7 @@ namespace CIAO return ::Components::EventConsumerBase::_duplicate ( iter->second->consumer ()); -#else +#else return ::Components::EventConsumerBase::_nil (); #endif } @@ -339,7 +339,7 @@ namespace CIAO const char *port_name) { CIAO_TRACE("Servant_Impl_Base::lookup_consumer_description"); - + if (0 == port_name) { /// Calling function will throw InvalidName after getting this. -- cgit v1.2.1