diff options
-rw-r--r-- | CIAO/ChangeLog | 5 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 44da8cbf8a7..d5065cb0bb3 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 24 08:29:40 UTC 2010 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp: + Build in extra check for errors. + Thu Jun 24 08:22:13 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl> * connectors/dds4ccm/tests/OneFile/Multiple/OFM_Connector.mpc: diff --git a/CIAO/connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp index f3a8d3b324e..5b222f7f86e 100644 --- a/CIAO/connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/DDSWriterEntity/Sender/Writer_Sender_exec.cpp @@ -216,15 +216,20 @@ namespace CIAO_Writer_Sender_Impl ::DDS::DataWriter_var dds_dw = this->context_->get_connection_info_write_dds_entity (); + if (::CORBA::is_nil (dds_dw.in ())) + { + ACE_ERROR ((LM_ERROR, "ERROR : Sender_exec_i::configuration_complete - " + "Datawriter connection is NIL.\n")); + throw CORBA::INTERNAL (); + } typedef ::CIAO::DDS4CCM::CCM_DDS_DataWriter_T< - CIAO_WriterTestConnector_DDS_Event_Impl::DDS_DDS_Event_Traits::value_type, - CIAO_WriterTestConnector_DDS_Event_Impl::WriterTest_DDS_Traits::value_type> DataWriter_type; + CIAO_WriterTestConnector_DDS_Event_Impl::DDS_DDS_Event_Traits, + CIAO_WriterTestConnector_DDS_Event_Impl::WriterTest_DDS_Traits> DataWriter_type; - DataWriter_type * typed_ccm_dw = dynamic_cast < DataWriter_type * > (dds_dw.in ()); + DataWriter_type * typed_ccm_dw = dynamic_cast <DataWriter_type *> (dds_dw.in ()); if (typed_ccm_dw) { - DDSDataWriter * p = dynamic_cast < DDSDataWriter * > (typed_ccm_dw->get_impl ()); - this->writer_ = dynamic_cast < WriterTestDataWriter * > (p); + this->writer_ = WriterTestDataWriter::narrow (typed_ccm_dw->get_impl ()); if (!this->writer_) { ACE_ERROR ((LM_ERROR, "ERROR : Sender_exec_i::configuration_complete - " @@ -236,7 +241,7 @@ namespace CIAO_Writer_Sender_Impl else { ACE_ERROR ((LM_ERROR, "ERROR : Sender_exec_i::configuration_complete - " - "Error casting DataWriter_var to typed DataWriter\n")); + "Error casting DataWriter to typed DataWriter\n")); throw CORBA::INTERNAL (); } } |