diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-02-04 08:12:22 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-02-04 08:12:22 +0000 |
commit | d95bf1f46ce97c3491f2fbe43539bc012b28946b (patch) | |
tree | faf1c64911abaa4dd501c2234fa48185f3d791c4 /CIAO/connectors/dds4ccm/impl | |
parent | dbff070f4f1929022cdbfa95ec33e85e6b7d4b55 (diff) | |
download | ATCD-d95bf1f46ce97c3491f2fbe43539bc012b28946b.tar.gz |
Mon Feb 4 08:11:50 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp
* (activate_topic):
Fixed logic error, when no listener is passed in we create
the default one, but always install a listener. Thanks to
Jiang Wei <jiangwei_1976 at yahoo dot com dot cn> for
reporting this problem. This fixes bugzilla 4089
Diffstat (limited to 'CIAO/connectors/dds4ccm/impl')
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp index 68bc90fd0ae..3bddcee0e7d 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp @@ -779,6 +779,8 @@ DDS_Base_Connector_T<CCM_TYPE>::activate_topic ( if (mask != 0) { + // If no listener has been passed in we create the default + // topic listener if (::CORBA::is_nil (listener)) { ACE_NEW_THROW_EX (listener, @@ -786,18 +788,17 @@ DDS_Base_Connector_T<CCM_TYPE>::activate_topic ( error_listener.in (), reactor), ::CORBA::NO_MEMORY ()); + } - DDS::ReturnCode_t const retcode = topic->set_listener (listener, - mask); + DDS::ReturnCode_t const retcode = topic->set_listener (listener, mask); - if (retcode != ::DDS::RETCODE_OK) - { - DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO - "DDS_Base_Connector_T::activate_topic - " - "Error while setting the listener on the topic - <%C>\n", - ::CIAO::DDS4CCM::translate_retcode (retcode))); - throw ::CORBA::INTERNAL (); - } + if (retcode != ::DDS::RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Base_Connector_T::activate_topic - " + "Error while setting the listener on the topic - <%C>\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + throw ::CORBA::INTERNAL (); } } } |