diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-07-23 18:48:12 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-07-23 18:48:12 +0000 |
commit | ce9a9dff175daddfa99c3a7f08c0632e93352c17 (patch) | |
tree | d05e6a4157c838061636635e184706e9b0b83e70 /CIAO | |
parent | 7ace05857a19d3e484d2ce7c9f5839da6c9d7331 (diff) | |
download | ATCD-ce9a9dff175daddfa99c3a7f08c0632e93352c17.tar.gz |
Mon Jul 23 18:47:26 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* connectors/dds4ccm/impl/ConditionManager.h:
Doxygen improvements
* connectors/dds4ccm/impl/ConditionManager.cpp (query):
Check if qc_reader is nil before using it
Diffstat (limited to 'CIAO')
-rw-r--r-- | CIAO/ChangeLog | 8 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ConditionManager.cpp | 18 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ConditionManager.h | 12 |
3 files changed, 27 insertions, 11 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index d659798645f..88f2b44069d 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,11 @@ +Mon Jul 23 18:47:26 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * connectors/dds4ccm/impl/ConditionManager.h: + Doxygen improvements + + * connectors/dds4ccm/impl/ConditionManager.cpp (query): + Check if qc_reader is nil before using it + Mon Jul 23 17:38:31 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * connectors/dds4ccm/examples/Hello/Receiver/Hello_Receiver_exec.cpp: diff --git a/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp b/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp index 03ad8866bbb..75331402be5 100644 --- a/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp +++ b/CIAO/connectors/dds4ccm/impl/ConditionManager.cpp @@ -132,15 +132,24 @@ namespace CIAO // and therefor nil. DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO ACE_TEXT ("ConditionManager::query - ") - ACE_TEXT ("Error: No QueryCondition set yet. ") - ACE_TEXT ("First set a filter.\n"))); + ACE_TEXT ("Error: No QueryCondition set yet, ") + ACE_TEXT ("first set a filter.\n"))); + throw ::CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0); + } + if (::CORBA::is_nil (this->qc_reader_.in ())) + { + // qc reader is nil + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + ACE_TEXT ("ConditionManager::query - ") + ACE_TEXT ("Error: qc reader is nil, ") + ACE_TEXT ("first set a filter.\n"))); throw ::CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0); } ::CCM_DDS::QueryFilter_var filter; ACE_NEW_THROW_EX (filter, ::CCM_DDS::QueryFilter(), ::CORBA::NO_MEMORY ()); - filter->expression= this->qc_reader_->get_query_expression (); + filter->expression = this->qc_reader_->get_query_expression (); this->qc_reader_->get_query_parameters (filter->parameters); return filter._retn (); } @@ -155,7 +164,8 @@ namespace CIAO // this should be removed first. Instead of a readcondition, there should // be a QueryCondition attached to the waitset if (! ::CORBA::is_nil (this->rd_condition_.in ())) - { // Getter functionality + { + // Getter functionality // First remove the existing conditions from the waitset // Than create a new (query) condition and attach it to the waitset // instead of the readcondition diff --git a/CIAO/connectors/dds4ccm/impl/ConditionManager.h b/CIAO/connectors/dds4ccm/impl/ConditionManager.h index b584a5a0a04..469b6b96407 100644 --- a/CIAO/connectors/dds4ccm/impl/ConditionManager.h +++ b/CIAO/connectors/dds4ccm/impl/ConditionManager.h @@ -69,7 +69,7 @@ namespace CIAO /** * Getter functionality. * Creates a read_condition for the getter. - * It'll also initialize the waitset and attaches the + * It will also initialize the waitset and attaches the * read_condition to the waitset. */ void init_readcondition (void); @@ -82,13 +82,11 @@ namespace CIAO bool wait (const ::DDS::Duration_t & time_out); /** - * Returns the internal filter. This is the - * DDS4CCM QueryFilter (a representive of the - * DDS query). + * Returns the internal filter. This is the DDS4CCM QueryFilter + * (a representation of the DDS query). * - * If the QueryFilter hasn't been initialized, - * a ::CCM_DDS::InternalError exception with - * error code ::DDS::RETCODE_ERROR is thrown. + * If the QueryFilter hasn't been initialized, a ::CCM_DDS::InternalError + * exception with error code ::DDS::RETCODE_ERROR is thrown. */ ::CCM_DDS::QueryFilter * query (void); |