diff options
author | crodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-28 21:28:16 +0000 |
---|---|---|
committer | crodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-28 21:28:16 +0000 |
commit | 255e65d89e4a01823d04f87e7c0fbe1ba9fb4d3c (patch) | |
tree | 171146f9fa36c617de11f00510f46b41244d9a79 /TAO | |
parent | 23ee6ee422cf91be883ca0f3211e21904561557f (diff) | |
download | ATCD-255e65d89e4a01823d04f87e7c0fbe1ba9fb4d3c.tar.gz |
ChangeLogTag: Sun Jul 28 21:05:07 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
Diffstat (limited to 'TAO')
24 files changed, 281 insertions, 299 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index ba0d61f819e..1a4a0bb4808 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,33 @@ +Sun Jul 28 21:05:07 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> + + * orbsvcs/orbsvcs/AV/AVStreams_i.cpp: + * orbsvcs/orbsvcs/AV/AVStreams_i.h: + * orbsvcs/orbsvcs/AV/AVStreams_i.i: + * orbsvcs/orbsvcs/AV/AV_Core.cpp: + * orbsvcs/orbsvcs/AV/Flows_T.cpp: + * orbsvcs/orbsvcs/AV/Policy.cpp: + * orbsvcs/orbsvcs/AV/RTP.cpp: + * orbsvcs/orbsvcs/AV/TCP.cpp: + * orbsvcs/orbsvcs/AV/Transport.cpp: + * orbsvcs/orbsvcs/AV/UDP.cpp: + * orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp: + * orbsvcs/tests/AVStreams/Full_Profile/ftp.h: + * orbsvcs/tests/AVStreams/Full_Profile/run_test.pl: + * orbsvcs/tests/AVStreams/Full_Profile/server.cpp: + * orbsvcs/tests/AVStreams/Full_Profile/server.h: + * orbsvcs/tests/AVStreams/Latency/control.cpp: + * orbsvcs/tests/AVStreams/Latency/ping.cpp: + * orbsvcs/tests/AVStreams/Latency/pong.cpp: + * orbsvcs/tests/AVStreams/Latency/run_test.pl: + * orbsvcs/tests/AVStreams/Latency/svc.conf: + * orbsvcs/tests/AVStreams/Multicast/ftp.cpp: + * orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp: + * orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp: + Code cleanups, memory fixes, in attempt to fix + Full_Profile and Latency tests. Multicast_Full_Profile + test isn't quite working, but it is not crashing like it + used to. + Sun Jul 28 13:36:48 2002 Jaiganesh Balasubramanian <jai@doc.ece.uci.edu> * orbsvcs/tests/Trading/Trading.dsw: diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 91a0b6e9425..c062ad2d13e 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -89,11 +89,11 @@ TAO_Basic_StreamCtrl::stop (const AVStreams::flowSpec &flow_spec { char *flowname = TAO_AV_Core::get_flowname (flow_spec[i]); ACE_CString flow_name_key (flowname); - FlowConnection_Map::ENTRY *flow_connection_entry = 0; + AVStreams::FlowConnection_var flow_connection_entry; if (this->flow_connection_map_.find (flow_name_key, flow_connection_entry) == 0) { - flow_connection_entry->int_id_->stop (ACE_ENV_SINGLE_ARG_PARAMETER); + flow_connection_entry->stop (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -101,7 +101,7 @@ TAO_Basic_StreamCtrl::stop (const AVStreams::flowSpec &flow_spec { // call stop on all the flows. FlowConnection_Map_Iterator iterator (this->flow_connection_map_); - FlowConnection_Map_Entry *entry = 0; + FlowConnection_Map_Entry *entry; for (;iterator.next (entry) != 0;iterator.advance ()) { entry->int_id_->stop (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -272,11 +272,15 @@ TAO_Basic_StreamCtrl::get_flow_connection (const char *flow_name AVStreams::notSupported)) { ACE_CString flow_name_key (flow_name); - FlowConnection_Map::ENTRY *flow_connection_entry = 0; - if (this->flow_connection_map_.find (flow_name_key, flow_connection_entry) == 0) - return AVStreams::FlowConnection::_duplicate (flow_connection_entry->int_id_); - else + AVStreams::FlowConnection_var flow_connection_entry; + + if (this->flow_connection_map_.find (flow_name_key, flow_connection_entry) == 0){ + return flow_connection_entry._retn(); + } + else{ + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%N,%l) Cannot find flow: %s\n", flow_name )); ACE_THROW_RETURN (AVStreams::noSuchFlow (), CORBA::Object::_nil ()); + } } // Sets the flow connection. @@ -288,7 +292,7 @@ TAO_Basic_StreamCtrl::set_flow_connection (const char *flow_name, AVStreams::noSuchFlow, AVStreams::notSupported)) { - AVStreams::FlowConnection_ptr flow_connection = AVStreams::FlowConnection::_nil (); + AVStreams::FlowConnection_var flow_connection; ACE_TRY { flow_connection = AVStreams::FlowConnection::_narrow (flow_connection_obj ACE_ENV_ARG_PARAMETER); @@ -306,15 +310,14 @@ TAO_Basic_StreamCtrl::set_flow_connection (const char *flow_name, this->flows_ [this->flow_count_++] = CORBA::string_dup (flow_name); ACE_CString flow_name_key (flow_name); if (this->flow_connection_map_.bind (flow_name_key, flow_connection) != 0) + { + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%N,%l) Cannot find flow: %s\n", flow_name )); ACE_THROW (AVStreams::noSuchFlow ());// is this right? + } } TAO_Basic_StreamCtrl::~TAO_Basic_StreamCtrl (void) { - FlowConnection_Map_Iterator iterator (this->flow_connection_map_); - FlowConnection_Map_Entry *entry = 0; - for (;iterator.next (entry) != 0;iterator.advance ()) - CORBA::release (entry->int_id_); } // ---------------------------------------------------------------------- @@ -915,8 +918,37 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party, if (!CORBA::is_nil (a_party) && !CORBA::is_nil (b_party)) { - if (!CORBA::is_nil (this->vdev_a_.in ()) && !CORBA::is_nil (this->vdev_b_.in ())) - { + // Check to see if the MMDevice contains FDev objects + // If it contains FDev objects, then we are using the + // Full profile, and we want to call bind() instead + // of connect() on the the streamctrl + if( a_party->is_property_defined("Flows") && + b_party->is_property_defined("Flows") ) + { + if (TAO_debug_level > 0) { + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Full profile, invoking bind()\n")); + } + + // It is full profile + // we have feps in the sep then dont call connect + // instead call bind on the streamctrl. + this->bind (this->sep_a_.in (), + this->sep_b_.in (), + the_qos, + the_flows + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + + + } + // This is the light profile, call connect() + else if (!CORBA::is_nil (this->vdev_a_.in ()) && !CORBA::is_nil (this->vdev_b_.in ())) + { + if (TAO_debug_level > 0) { + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Light profile, invoking connect()\n")); + } + // Tell the 2 VDev's about one another this->vdev_a_->set_peer (this->streamctrl_.in (), this->vdev_b_.in (), @@ -943,18 +975,7 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party, ACE_TRY_CHECK; if (result == 0) ACE_ERROR_RETURN ((LM_ERROR, "sep_a->connect (sep_b) failed\n"), 0); - } - else - { - // Its full profile - // we have feps in the sep then dont call connect instead call bind on the streamctrl. - this->bind (this->sep_a_.in (), - this->sep_b_.in (), - the_qos, - the_flows - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } + } } } ACE_CATCHANY @@ -986,8 +1007,8 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, int result = 0; ACE_TRY { - if (CORBA::is_nil (sep_a) || - CORBA::is_nil (sep_b)) + if (CORBA::is_nil (sep_a_.in() ) || + CORBA::is_nil (sep_b_.in() )) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) TAO_StreamCtrl::bind:" "a_party or b_party null!"), @@ -996,12 +1017,12 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, // Define each other as their peers. CORBA::Any sep_any; sep_any <<= sep_b; - sep_a->define_property ("PeerAdapter", + sep_a_->define_property ("PeerAdapter", sep_any ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; sep_any <<= sep_a; - sep_b->define_property ("PeerAdapter", + sep_b_->define_property ("PeerAdapter", sep_any ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -1010,12 +1031,12 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, // the flows spec is empty and hence we do a exhaustive match. AVStreams::flowSpec a_flows, b_flows; CORBA::Any_var flows_any; - flows_any = sep_a->get_property_value ("Flows" ACE_ENV_ARG_PARAMETER); + flows_any = sep_a_->get_property_value ("Flows" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::flowSpec *temp_flows; flows_any.in () >>= temp_flows; a_flows = *temp_flows; - flows_any = sep_b->get_property_value ("Flows" ACE_ENV_ARG_PARAMETER); + flows_any = sep_b_->get_property_value ("Flows" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; flows_any.in () >>= temp_flows; b_flows = *temp_flows; @@ -1033,17 +1054,17 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, const char *flowname = a_flows[i]; // get the flowendpoint references. CORBA::Object_var fep_obj = - sep_a->get_fep (flowname + sep_a_->get_fep (flowname ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FlowEndPoint_ptr fep = + AVStreams::FlowEndPoint_var fep = AVStreams::FlowEndPoint::_narrow (fep_obj.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_CString fep_key (flowname); result = a_fep_map->bind (fep_key, fep); if (result == -1) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_StreamCtrl::bind failed for %s", flowname)); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_StreamCtrl::bind failed for %s\n", flowname)); } // get the flowendpoints for streamendpoint_b for (i=0;i<b_flows.length ();i++) @@ -1054,14 +1075,14 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, sep_b->get_fep (flowname ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FlowEndPoint_ptr fep = + AVStreams::FlowEndPoint_var fep = AVStreams::FlowEndPoint::_narrow (fep_obj.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_CString fep_key (flowname); result = b_fep_map->bind (fep_key, fep); if (result == -1) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_StreamCtrl::bind failed for %s", flowname)); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_StreamCtrl::bind failed for %s\n", flowname)); } FlowEndPoint_Map *map_a = 0, *map_b = 0; if (flow_spec.length () == 0) @@ -1086,22 +1107,22 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, 0); entry->parse (flow_spec[i].in ()); ACE_CString fep_key (entry->flowname ()); - AVStreams::FlowEndPoint_ptr fep; + AVStreams::FlowEndPoint_var fep; result = a_fep_map->find (fep_key, fep); if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Fep not found on A side for flowname: %s", flow_spec[i].in ()), 0); + ACE_ERROR_RETURN ((LM_ERROR, "Fep not found on A side for flowname: %s\n", flow_spec[i].in ()), 0); result = spec_fep_map_a->bind (fep_key, fep); if (result == -1) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "Bind failed for %s", flow_spec[i].in ())); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "Bind failed for %s\n", flow_spec[i].in ())); result = b_fep_map->find (fep_key, fep); if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Fep not found on B side for flowname: %s", flow_spec[i].in ()), 0); + ACE_ERROR_RETURN ((LM_ERROR, "Fep not found on B side for flowname: %s\n", flow_spec[i].in ()), 0); result = spec_fep_map_b->bind (fep_key, fep); if (result == -1) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "Bind failed for %s", flow_spec[i].in ())); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "Bind failed for %s\n", flow_spec[i].in ())); } map_a = spec_fep_map_a; map_b = spec_fep_map_b; @@ -1118,7 +1139,7 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, for (;a_feps_iterator.next (a_feps_entry) != 0; a_feps_iterator.advance ()) { - AVStreams::FlowEndPoint_ptr fep_a = a_feps_entry->int_id_; + AVStreams::FlowEndPoint_var fep_a = a_feps_entry->int_id_; AVStreams::FlowEndPoint_var connected_to = fep_a->get_connected_fep (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK_EX (flow_connect); @@ -1133,7 +1154,7 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, for (;b_feps_iterator.next (b_feps_entry) != 0; b_feps_iterator.advance ()) { - AVStreams::FlowEndPoint_ptr fep_b = b_feps_entry->int_id_; + AVStreams::FlowEndPoint_var fep_b = b_feps_entry->int_id_; AVStreams::FlowConnection_var flow_connection; AVStreams::FlowEndPoint_var connected_to = @@ -1146,7 +1167,7 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, continue; } - if (fep_a->is_fep_compatible (fep_b + if (fep_a->is_fep_compatible (fep_b.in() ACE_ENV_ARG_PARAMETER) == 1) { ACE_TRY_CHECK_EX (flow_connect); @@ -1154,7 +1175,7 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, // can use either of them. CORBA::Object_var flow_connection_obj; CORBA::Any_var flowname_any = - fep_a->get_property_value ("Flow" + fep_a->get_property_value ("FlowName" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (flow_connect); const char *flowname = 0; @@ -1198,11 +1219,11 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, ACE_TRY_EX (producer_check) { producer = - AVStreams::FlowProducer::_narrow (fep_a + AVStreams::FlowProducer::_narrow (fep_a.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (producer_check); consumer = - AVStreams::FlowConsumer::_narrow (fep_b + AVStreams::FlowConsumer::_narrow (fep_b.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (producer_check); @@ -1211,11 +1232,11 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, if (CORBA::is_nil (producer.in ())) { producer = - AVStreams::FlowProducer::_narrow (fep_b + AVStreams::FlowProducer::_narrow (fep_b.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (producer_check); consumer = - AVStreams::FlowConsumer::_narrow (fep_a + AVStreams::FlowConsumer::_narrow (fep_a.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (producer_check); } @@ -2443,9 +2464,9 @@ TAO_StreamEndPoint::get_fep (const char *flow_name AVStreams::noSuchFlow)) { ACE_CString fep_name_key (flow_name); - FlowEndPoint_Map::ENTRY *fep_entry = 0; + AVStreams::FlowEndPoint_var fep_entry; if (this->fep_map_.find (fep_name_key, fep_entry) == 0) - return fep_entry->int_id_; + return fep_entry._retn(); return 0; } @@ -2456,21 +2477,16 @@ TAO_StreamEndPoint::add_fep_i_add_property (AVStreams::FlowEndPoint_ptr fep AVStreams::notSupported, AVStreams::streamOpFailed)) { - char* tmp; - ACE_NEW_RETURN (tmp, - char[64], - 0); - CORBA::String_var flow_name = tmp; + ACE_CString flow_name; ACE_TRY { // exception implies the flow name is not defined and is system // generated. - ACE_OS::sprintf (tmp, - "flow%d", - this->flow_num_++); + flow_name = "flow"; + flow_name += this->flow_num_++; CORBA::Any flowname_any; - flowname_any <<= flow_name.in (); + flowname_any <<= flow_name.c_str (); fep->define_property ("Flow", flowname_any ACE_ENV_ARG_PARAMETER); @@ -2483,7 +2499,7 @@ TAO_StreamEndPoint::add_fep_i_add_property (AVStreams::FlowEndPoint_ptr fep return 0; } ACE_ENDTRY; - return flow_name._retn (); + return ACE_OS::strdup( flow_name.c_str () ); } char* @@ -2572,7 +2588,7 @@ TAO_StreamEndPoint::remove_fep (const char *flow_name ACE_TRY { ACE_CString fep_name_key (flow_name); - AVStreams::FlowEndPoint_ptr fep_entry = 0; + AVStreams::FlowEndPoint_var fep_entry; // Remove the fep from the hash table. if (this->fep_map_.unbind (fep_name_key, fep_entry)!= 0) ACE_THROW (AVStreams::streamOpFailed ()); @@ -2732,7 +2748,8 @@ TAO_StreamEndPoint_A::multiconnect (AVStreams::streamQoS &stream_qos, 0); forward_entry->parse (flow_spec[i]); ACE_CString mcast_key (forward_entry->flowname ()); - AVStreams::FlowEndPoint_ptr flow_endpoint = AVStreams::FlowEndPoint::_nil (); + AVStreams::FlowEndPoint_var flow_endpoint; + // @@Naga: There is a problem in the full profile case for multiconnect. Since // multiconnect on sep_a is called everytime a sink is added and if called for // the same flow twice, the following code will just call add producer on the flow connection. @@ -2748,9 +2765,11 @@ TAO_StreamEndPoint_A::multiconnect (AVStreams::streamQoS &stream_qos, AVStreams::QoS flow_qos; result = qos.get_flow_qos (forward_entry->flowname (), flow_qos); if (result < 0) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "QoS not found for %s", forward_entry->flowname ())); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "QoS not found for %s\n", forward_entry->flowname ())); // Narrow it to FlowProducer. - AVStreams::FlowProducer_var producer = AVStreams::FlowProducer::_narrow (flow_endpoint ACE_ENV_ARG_PARAMETER); + AVStreams::FlowProducer_var producer; + producer = AVStreams::FlowProducer::_narrow (flow_endpoint.in() ACE_ENV_ARG_PARAMETER); + // ACE_TRY_CHECK_EX (narrow); // Else narrow succeeeded. if (!CORBA::is_nil (producer.in ())) @@ -2970,7 +2989,7 @@ TAO_StreamEndPoint_B::multiconnect (AVStreams::streamQoS &stream_qos, forward_entry->parse (flow_spec[i]); ACE_CString mcast_key (forward_entry->flowname ()); AVStreams::FlowEndPoint_var flow_endpoint; - if (this->fep_map_.find (mcast_key, flow_endpoint.out ()) == 0) + if (this->fep_map_.find (mcast_key, flow_endpoint ) == 0) { AVStreams::FlowConsumer_var consumer; ACE_TRY_EX (narrow) @@ -3429,8 +3448,6 @@ TAO_MMDevice::create_A_B (MMDevice_Type type, ACE_TRY_CHECK; if (this->fdev_map_.current_size () > 0) { - // first set the vdev to be a nil pointer. - the_vdev = AVStreams::VDev::_nil (); TAO_AV_QoS qos (the_qos); // create flowendpoints from the FDevs. for (u_int i=0;i<flow_spec.length ();i++) @@ -3438,14 +3455,16 @@ TAO_MMDevice::create_A_B (MMDevice_Type type, TAO_Forward_FlowSpec_Entry forward_entry; forward_entry.parse (flow_spec[i]); ACE_CString flow_key (forward_entry.flowname ()); - AVStreams::FDev_ptr flow_dev; - AVStreams::FlowConnection_var flowconnection = AVStreams::FlowConnection::_nil (); + AVStreams::FDev_var flow_dev; + AVStreams::FlowConnection_var flowconnection; ACE_TRY_EX (flowconnection) { // Get the flowconnection for this flow. + //static int blah = 0; if(blah == 1){blah=0; abort();}else{blah=1;} CORBA::Object_var flowconnection_obj = streamctrl->get_flow_connection (forward_entry.flowname () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (flowconnection); + printf("successfully called get_flow_connection\n"); if (!CORBA::is_nil (flowconnection_obj.in ())) { flowconnection = AVStreams::FlowConnection::_narrow (flowconnection_obj.in () @@ -3453,9 +3472,22 @@ TAO_MMDevice::create_A_B (MMDevice_Type type, ACE_TRY_CHECK_EX (flowconnection); } } + ACE_CATCH(AVStreams::noSuchFlow, nsf) + { + TAO_FlowConnection *flowConnection; + ACE_NEW_RETURN (flowConnection, + TAO_FlowConnection, + 0); + flowconnection = flowConnection->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + streamctrl->set_flow_connection (forward_entry.flowname(), + flowconnection.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } ACE_CATCHANY { - if (TAO_debug_level > 0) + //if (TAO_debug_level >= 0) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_MMDevice::create_a::get_flow_connection"); } ACE_ENDTRY; @@ -3463,14 +3495,14 @@ TAO_MMDevice::create_A_B (MMDevice_Type type, int result = this->fdev_map_.find (flow_key, flow_dev); if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, "fdev_map::find failed\n"), 0); + ACE_ERROR_RETURN ((LM_ERROR, "(%N,%l) fdev_map::find failed\n"), 0); CORBA::String_var named_fdev; AVStreams::FlowEndPoint_var flow_endpoint; AVStreams::QoS flow_qos; result = qos.get_flow_qos (forward_entry.flowname (), flow_qos); if (result < 0) - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "get_flow_qos failed for %s\n", forward_entry.flowname ())); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%N,%l) get_flow_qos failed for %s\n", forward_entry.flowname ())); switch (forward_entry.direction ()) { case TAO_FlowSpec_Entry::TAO_AV_DIR_IN: @@ -3723,10 +3755,10 @@ TAO_MMDevice::add_fdev (CORBA::Object_ptr fdev_obj // Add it to the sequence of flowNames supported. // put the flowname and the fdev in a hashtable. - ACE_CString fdev_name_key (CORBA::string_dup (flow_name.in ())); + ACE_CString fdev_name_key ( flow_name.in () ); - if (this->fdev_map_.bind (fdev_name_key, AVStreams::FDev::_duplicate (fdev.in ())) != 0) + if ( (this->fdev_map_.bind (fdev_name_key, fdev )) != 0) ACE_THROW_RETURN (AVStreams::streamOpFailed (), 0); // increment the flow count. this->flow_count_++; @@ -3762,9 +3794,9 @@ TAO_MMDevice::get_fdev (const char *flow_name { ACE_CString fdev_name_key (flow_name); - FDev_Map::ENTRY *fdev_entry = 0; + AVStreams::FDev_var fdev_entry; if (this->fdev_map_.find (fdev_name_key, fdev_entry) == 0) - return AVStreams::FDev::_duplicate (fdev_entry->int_id_); + return fdev_entry._retn() ; return 0; } @@ -3780,14 +3812,11 @@ TAO_MMDevice::remove_fdev (const char *flow_name ACE_TRY { ACE_CString fdev_name_key (flow_name); - AVStreams::FDev_ptr fdev_entry = AVStreams::FDev::_nil (); + AVStreams::FDev_var fdev_entry; // Remove the fep from the hash table. if (this->fdev_map_.unbind (fdev_name_key, fdev_entry)!= 0) ACE_THROW (AVStreams::streamOpFailed ()); - if (!CORBA::is_nil (fdev_entry)) - CORBA::release (fdev_entry); - AVStreams::flowSpec new_flows (this->flows_.length ()); for (u_int i=0, j=0 ; i <this->flows_.length (); i++) if (ACE_OS::strcmp (flow_name, this->flows_[i]) != 0) @@ -3813,10 +3842,6 @@ TAO_MMDevice::remove_fdev (const char *flow_name TAO_MMDevice::~TAO_MMDevice (void) { delete this->stream_ctrl_; - FDev_Map_Iterator iterator (fdev_map_); - FDev_Map_Entry *entry = 0; - for (;iterator.next (entry) != 0; iterator.advance ()) - CORBA::release (entry->int_id_); } //------------------------------------------------------------------ @@ -4399,7 +4424,7 @@ TAO_FlowEndPoint::open (const char *flowname, { CORBA::Any flowname_any; flowname_any <<= flowname; - this->define_property ("Flow", + this->define_property ("FlowName", flowname_any ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h index 27dcef1c7b7..7610d29c0c0 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ //============================================================================= /** @@ -55,9 +54,9 @@ # pragma warning (disable : 4250) #endif /* _MSC_VER */ -typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FlowEndPoint_ptr,ACE_Null_Mutex> FlowEndPoint_Map; -typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FlowEndPoint_ptr> FlowEndPoint_Map_Entry; -typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FlowEndPoint_ptr,ACE_Null_Mutex> FlowEndPoint_Map_Iterator; +typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FlowEndPoint_var,ACE_Null_Mutex> FlowEndPoint_Map; +typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FlowEndPoint_var> FlowEndPoint_Map_Entry; +typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FlowEndPoint_var,ACE_Null_Mutex> FlowEndPoint_Map_Iterator; typedef ACE_Hash_Map_Manager <ACE_CString,TAO_AV_Flow_Handler*,ACE_Null_Mutex> Flow_Handler_Map; typedef ACE_Hash_Map_Entry <ACE_CString,TAO_AV_Flow_Handler*> Flow_Handler_Map_Entry; @@ -168,9 +167,9 @@ protected: AVStreams::StreamEndPoint_B_var sep_b_; /// Hash table for the flow names and its corresponding flowconnection object reference. - typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FlowConnection_ptr,ACE_Null_Mutex> FlowConnection_Map; - typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FlowConnection_ptr,ACE_Null_Mutex> FlowConnection_Map_Iterator; - typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FlowConnection_ptr> FlowConnection_Map_Entry; + typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FlowConnection_var,ACE_Null_Mutex> FlowConnection_Map; + typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FlowConnection_var,ACE_Null_Mutex> FlowConnection_Map_Iterator; + typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FlowConnection_var> FlowConnection_Map_Entry; FlowConnection_Map flow_connection_map_; AVStreams::FlowConnection_seq flowConnections_; @@ -554,7 +553,6 @@ class TAO_AV_Export TAO_StreamEndPoint : public virtual POA_AVStreams::StreamEndPoint, public virtual TAO_Base_StreamEndPoint, public virtual PortableServer::RefCountServantBase -//public virtual TAO_PropertySet { public: @@ -1034,9 +1032,9 @@ protected: /// current flow number used for system generation of flow names. u_int flow_num_; - typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FDev_ptr,ACE_Null_Mutex> FDev_Map; - typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FDev_ptr,ACE_Null_Mutex> FDev_Map_Iterator; - typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FDev_ptr> FDev_Map_Entry; + typedef ACE_Hash_Map_Manager <ACE_CString,AVStreams::FDev_var,ACE_Null_Mutex> FDev_Map; + typedef ACE_Hash_Map_Iterator <ACE_CString,AVStreams::FDev_var,ACE_Null_Mutex> FDev_Map_Iterator; + typedef ACE_Hash_Map_Entry <ACE_CString,AVStreams::FDev_var> FDev_Map_Entry; /// hash table for the flownames and its corresponding flowEndpoint /// reference. @@ -1174,9 +1172,8 @@ protected: */ class TAO_AV_Export TAO_FlowEndPoint : public virtual POA_AVStreams::FlowEndPoint, - public virtual TAO_PropertySet, - // public virtual PortableServer::RefCountServantBase, - public virtual TAO_Base_StreamEndPoint + public virtual TAO_Base_StreamEndPoint, + public virtual PortableServer::RefCountServantBase { public: @@ -1550,6 +1547,7 @@ public: #include "Transport.h" #if defined (__ACE_INLINE__) +#include "tao/debug.h" #include "AVStreams_i.i" #endif /* __ACE_INLINE__ */ diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.i b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.i index f98b4a31f27..e192b5f05a0 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.i +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.i @@ -38,21 +38,22 @@ TAO_AV_QoS::get_flow_qos (const char *flowname, if (result < 0) { - ACE_DEBUG((LM_DEBUG, "(%N,%l) qos_map contains the flows:\n")); + if (TAO_debug_level > 0 ) { + ACE_DEBUG((LM_DEBUG, "(%N,%l) qos_map contains the flows:\n")); - ACE_Hash_Map_Manager<ACE_CString,AVStreams::QoS,ACE_Null_Mutex>::ITERATOR iter - = qos_map_.begin(); + ACE_Hash_Map_Manager<ACE_CString,AVStreams::QoS,ACE_Null_Mutex>::ITERATOR iter + = qos_map_.begin(); - while( iter != qos_map_.end() ) + while( iter != qos_map_.end() ) { ACE_DEBUG((LM_DEBUG, " %s\n", (*iter).ext_id_.c_str() )); ++iter; } - - ACE_ERROR_RETURN ((LM_DEBUG, - "(%N,%l) TAO_AV_QOS::get_flow_qos qos_map::find failed for %s\n", - flowname), - -1); + + ACE_DEBUG ((LM_DEBUG, + "(%N,%l) TAO_AV_QOS::get_flow_qos qos_map::find failed for %s\n", flowname)); + } + return -1; } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp index da0c101318b..26d9b2cdf74 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp @@ -217,7 +217,7 @@ TAO_AV_Core::init_forward_flows (TAO_Base_StreamEndPoint *endpoint, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "address given for flow %s", + "address given for flow %s\n", entry->flowname ())); address_flow_set.insert (entry); @@ -286,7 +286,7 @@ TAO_AV_Core::init_forward_flows (TAO_Base_StreamEndPoint *endpoint, if (address_flow_set.size () > 0) { ACE_DEBUG ((LM_DEBUG, - "This connector registry is called ONE\n")); + "(%N,%l) This connector registry is called\n")); result = this->connector_registry_->open (endpoint, this, diff --git a/TAO/orbsvcs/orbsvcs/AV/Flows_T.cpp b/TAO/orbsvcs/orbsvcs/AV/Flows_T.cpp index a309efdf318..86cef7e0568 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Flows_T.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Flows_T.cpp @@ -110,9 +110,7 @@ TAO_FDev<T_Producer, T_Consumer>::make_producer (AVStreams::FlowConnection_ptr / { // Activate the producer implementation under the Root POA. T_Producer *producer_i; - ACE_NEW_RETURN (producer_i, - T_Producer, - 0); + ACE_NEW_RETURN (producer_i, T_Producer, 0); this->producer_list_.insert_tail (producer_i); producer = producer_i->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; @@ -141,9 +139,8 @@ TAO_FDev<T_Producer, T_Consumer>::make_consumer (AVStreams::FlowConnection_ptr / { // Activate the consumer implementation under the Root POA. T_Consumer *consumer_i; - ACE_NEW_RETURN (consumer_i, - T_Consumer, - 0); + ACE_NEW_RETURN (consumer_i, T_Consumer, 0 ); + this->consumer_list_.insert_tail (consumer_i); consumer = consumer_i->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/orbsvcs/AV/Policy.cpp b/TAO/orbsvcs/orbsvcs/AV/Policy.cpp index 75d1db192cb..111be5b8731 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Policy.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Policy.cpp @@ -96,10 +96,11 @@ TAO_AV_Callback::handle_destroy (void) } void -TAO_AV_Callback::get_timeout (ACE_Time_Value *& /*tv*/, +TAO_AV_Callback::get_timeout (ACE_Time_Value *& tv, void *& /*arg*/) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_Callback::get_timeout\n")); + tv = 0; } int diff --git a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp index e778cd92d93..4736e8bbd5c 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp @@ -731,8 +731,9 @@ TAO_AV_RTP_Flow_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, { TAO_AV_Callback *callback = 0; - endpoint->get_callback (entry->flowname (), - callback); + if( endpoint->get_callback (entry->flowname (), callback) ) { + ACE_ERROR_RETURN ((LM_ERROR, "(%N,%l) Invalid callback\n"), 0); + } TAO_AV_Protocol_Object *object = 0; ACE_NEW_RETURN (object, diff --git a/TAO/orbsvcs/orbsvcs/AV/TCP.cpp b/TAO/orbsvcs/orbsvcs/AV/TCP.cpp index 35f5a74497e..61aca7eea37 100644 --- a/TAO/orbsvcs/orbsvcs/AV/TCP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/TCP.cpp @@ -291,8 +291,9 @@ TAO_AV_TCP_Flow_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, TAO_AV_Transport *transport) { TAO_AV_Callback *callback = 0; - endpoint->get_callback (entry->flowname (), - callback); + if ( endpoint->get_callback (entry->flowname (), callback) ) { + ACE_ERROR_RETURN ((LM_ERROR, "(%N,%l) Invalid callback\n"), 0); + } TAO_AV_TCP_Object *object = 0; ACE_NEW_RETURN (object, diff --git a/TAO/orbsvcs/orbsvcs/AV/Transport.cpp b/TAO/orbsvcs/orbsvcs/AV/Transport.cpp index 5abc144c9f5..3286e5aeb59 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Transport.cpp @@ -337,7 +337,7 @@ TAO_AV_Acceptor_Registry::open_default (TAO_Base_StreamEndPoint *endpoint, // No matching flow protocol. if (flow_factory == 0) ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Unable to match protocol prefix " + "TAO (%P|%t) (%N,%l) Unable to match protocol prefix " "for <%s>\n", flow_protocol), -1); @@ -350,7 +350,7 @@ TAO_AV_Acceptor_Registry::open_default (TAO_Base_StreamEndPoint *endpoint, if (transport_factory == 0) ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Unable to match protocol prefix " + "TAO (%P|%t) (%N,%l) Unable to match protocol prefix " "for <%s>\n", transport_protocol), -1); @@ -535,8 +535,6 @@ TAO_AV_Flow_Handler::schedule_timer (void) 0, *tv); - delete tv; - if (this->timer_id_ < 0) return -1; @@ -591,8 +589,6 @@ TAO_AV_Flow_Handler::handle_timeout (const ACE_Time_Value & /*tv*/, 0, *timeout); - delete timeout; - if (this->timer_id_ < 0) return -1; diff --git a/TAO/orbsvcs/orbsvcs/AV/UDP.cpp b/TAO/orbsvcs/orbsvcs/AV/UDP.cpp index 46ed01670aa..3ddb54fa716 100644 --- a/TAO/orbsvcs/orbsvcs/AV/UDP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/UDP.cpp @@ -352,7 +352,7 @@ TAO_AV_UDP_Acceptor::open (TAO_Base_StreamEndPoint *endpoint, TAO_AV_Flow_Protocol_Factory *factory, TAO_AV_Core::Flow_Component flow_comp) { - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Acceptor::open ")); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Acceptor::open\n")); this->av_core_ = av_core; this->endpoint_ = endpoint; this->entry_ = entry; @@ -376,7 +376,7 @@ TAO_AV_UDP_Acceptor::open (TAO_Base_StreamEndPoint *endpoint, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "TAO_AV_UDP_Acceptor::open: %s", + "TAO_AV_UDP_Acceptor::open: %s\n", buf)); int result = this->open_i (inet_addr, 0); @@ -886,7 +886,7 @@ TAO_AV_UDP_Factory::match_protocol (const char *protocol_string) TAO_AV_Acceptor* TAO_AV_UDP_Factory::make_acceptor (void) { - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Factory::make_acceptor ")); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Factory::make_acceptor\n")); TAO_AV_Acceptor *acceptor = 0; ACE_NEW_RETURN (acceptor, TAO_AV_UDP_Acceptor, @@ -897,7 +897,7 @@ TAO_AV_UDP_Factory::make_acceptor (void) TAO_AV_Connector* TAO_AV_UDP_Factory::make_connector (void) { - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Factory::make_connector ")); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Factory::make_connector\n")); TAO_AV_Connector *connector = 0; ACE_NEW_RETURN (connector, TAO_AV_UDP_Connector, @@ -1014,8 +1014,9 @@ TAO_AV_UDP_Flow_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, TAO_AV_Transport *transport) { TAO_AV_Callback *callback = 0; - endpoint->get_callback (entry->flowname (), - callback); + if( endpoint->get_callback (entry->flowname (), callback) ) { + ACE_ERROR_RETURN ((LM_ERROR, "(%N,%l) Invalid callback\n"), 0); + } TAO_AV_UDP_Object *object = 0; ACE_NEW_RETURN (object, diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp index bb0af7be4ba..2a71d7cc7ce 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp @@ -139,10 +139,10 @@ Client::file (void) return this->fp_; } -char* +const char* Client::flowname (void) { - return this->flowname_; + return this->flowname_.c_str(); } AVStreams::protocolSpec @@ -176,9 +176,7 @@ Client::streamctrl (void) } Client::Client (void) - : client_mmdevice_ (&endpoint_strategy_), - fdev_ (0), - address_ (ACE_OS::strdup ("224.9.9.2:12345")), + : address_ (ACE_OS::strdup ("127.0.0.1:12345")), fp_ (0), protocol_ (ACE_OS::strdup ("UDP")), orb_ (TAO_AV_CORE::instance ()->orb ()), @@ -190,48 +188,6 @@ Client::Client (void) int -Client::bind_to_server (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - // Initialize the naming services - if (my_naming_client_.init (this->orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - CosNaming::Name server_mmdevice_name (1); - server_mmdevice_name.length (1); - server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice"); - CORBA::Object_var server_mmdevice_obj = - my_naming_client_->resolve (server_mmdevice_name - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (this->server_mmdevice_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " could not resolve Server_Mmdevice in Naming service <%s>\n"), - -1); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Client::bind_to_server\n"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - return 0; -} - -int Client::init (int argc,char **argv) { this->argc_ = argc; @@ -249,30 +205,22 @@ Client::init (int argc,char **argv) this->parse_args (this->argc_, this->argv_); - ACE_NEW_RETURN (this->fdev_, - FTP_Client_FDev, - -1); + ACE_NEW_RETURN ( this->streamendpoint_a_, + TAO_StreamEndPoint_A, -1 ); - ACE_NEW_RETURN (this->flowname_, - char [BUFSIZ], - 0); + ACE_NEW_RETURN ( this->fep_a_, FTP_Client_Producer, -1 ); + this->flowname_ = "Data"; - ACE_OS::sprintf (this->flowname_, - "Data"); + sep_a_ = this->streamendpoint_a_->_this( ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; - this->fdev_->flowname (this->flowname ()); - AVStreams::MMDevice_var mmdevice = this->client_mmdevice_._this (ACE_ENV_SINGLE_ARG_PARAMETER); + fep_a_obj_ = this->fep_a_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + + CORBA::String_var s1 = sep_a_->add_fep( fep_a_obj_.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (fdev.in () - ACE_ENV_ARG_PARAMETER); - if (this->my_naming_client_.init (this->orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Added flowendpoint named: %s\n", s1.in() )); this->fp_ = ACE_OS::fopen (this->filename_,"r"); @@ -281,10 +229,6 @@ Client::init (int argc,char **argv) ACE_DEBUG ((LM_DEBUG,"file opened successfully\n")); } - if (this->bind_to_server () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error binding to the naming service\n"), - -1); } ACE_CATCHANY { @@ -309,37 +253,37 @@ Client::run (void) ACE_OS::strcpy (flow_protocol_str,""); AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); AVStreams::flowSpec flow_spec (1); + flow_spec.length (1); ACE_INET_Addr addr (this->address_); - TAO_Forward_FlowSpec_Entry entry (this->flowname_, + TAO_Forward_FlowSpec_Entry entry (this->flowname_.c_str(), "IN", "USER_DEFINED", flow_protocol_str, this->protocol_, &addr); flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); - flow_spec.length (1); + ACE_High_Res_Timer timer; ACE_Time_Value elapsed; timer.start (); - AVStreams::MMDevice_var client_mmdevice - = this->client_mmdevice_._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - // Bind the client and server mmdevices. + CORBA::Object_var obj_b = this->orb_->string_to_object("corbaname:rir:#Server_StreamEndPoint_b"); + AVStreams::StreamEndPoint_B_var sep_b = AVStreams::StreamEndPoint_B::_narrow ( obj_b.in() ); + CORBA::Boolean result = - this->streamctrl_.bind_devs (client_mmdevice.in (), - this->server_mmdevice_.in (), - the_qos.inout (), - flow_spec - ACE_ENV_ARG_PARAMETER); + this->streamctrl_.bind ( sep_a_.in(), sep_b.in(), + the_qos.inout(), flow_spec + ACE_ENV_ARG_PARAMETER ); + timer.stop (); timer.elapsed_time (elapsed); elapsed.dump (); ACE_TRY_CHECK; if (result == 0) - ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind_devs failed\n"),-1); + ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind failed\n"),-1); + AVStreams::flowSpec start_spec (1); this->streamctrl_.start (start_spec ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -416,7 +360,6 @@ main (int argc, template class ACE_Singleton <Client,ACE_Null_Mutex>; template class TAO_AV_Endpoint_Reactive_Strategy_A<TAO_StreamEndPoint_A,TAO_VDev,AV_Null_MediaCtrl>; template class TAO_AV_Endpoint_Reactive_Strategy<TAO_StreamEndPoint_A,TAO_VDev,AV_Null_MediaCtrl>; -template class TAO_FDev <FTP_Client_Producer,TAO_FlowConsumer>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Singleton <Client,ACE_Null_Mutex> #pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_A<TAO_StreamEndPoint_A,TAO_VDev,AV_Null_MediaCtrl> diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.h b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.h index 9e78faec32e..e01eae292b0 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.h +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.h @@ -6,7 +6,6 @@ #include "ace/Get_Opt.h" #include "ace/High_Res_Timer.h" -#include "orbsvcs/Naming/Naming_Utils.h" #include "orbsvcs/AV/AVStreams_i.h" #include "orbsvcs/AV/Flows_T.h" #include "orbsvcs/AV/Endpoint_Strategy.h" @@ -48,7 +47,6 @@ protected: }; typedef TAO_AV_Endpoint_Reactive_Strategy_A<TAO_StreamEndPoint_A,TAO_VDev,AV_Null_MediaCtrl> ENDPOINT_STRATEGY; -typedef TAO_FDev <FTP_Client_Producer,TAO_FlowConsumer> FTP_Client_FDev; class Client { @@ -57,18 +55,14 @@ public: int init (int argc, char **argv); int run (void); FILE *file (void); - char *flowname (void); + const char *flowname (void); TAO_StreamCtrl* streamctrl (void); AVStreams::protocolSpec protocols (void); const char *format (void); const char *address (void); private: int parse_args (int argc, char **argv); - int bind_to_server (void); ENDPOINT_STRATEGY endpoint_strategy_; - AVStreams::MMDevice_var server_mmdevice_; - TAO_MMDevice client_mmdevice_; - FTP_Client_FDev *fdev_; TAO_StreamCtrl streamctrl_; // Video stream controller @@ -77,13 +71,16 @@ private: const char *filename_; const char *address_; - TAO_Naming_Client my_naming_client_; FILE *fp_; char *protocol_; - char *flowname_; + ACE_CString flowname_; int use_sfp_; CORBA::ORB_var orb_; PortableServer::POA_ptr poa_; + TAO_StreamEndPoint_A *streamendpoint_a_; + AVStreams::StreamEndPoint_A_var sep_a_; + FTP_Client_Producer *fep_a_; + AVStreams::FlowProducer_var fep_a_obj_; }; typedef ACE_Singleton<Client,ACE_Null_Mutex> CLIENT; diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl index 9c507bb244c..f07a1f24d7b 100755 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl @@ -18,6 +18,7 @@ $testfile = PerlACE::LocalFile ("test"); $makefile = PerlACE::LocalFile ("Makefile"); unlink $nsior; +unlink $testfile; $NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior"); $SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $testfile"); diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp index 22f43ecfdb1..20db38b4e59 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp @@ -122,42 +122,34 @@ Server::init (int argc, "the TAO_Naming_Client. \n"), -1); - // Register the video mmdevice object with the ORB - ACE_NEW_RETURN (this->mmdevice_, - TAO_MMDevice (&this->reactive_strategy_), - -1); + ACE_NEW_RETURN (this->streamendpoint_b_, TAO_StreamEndPoint_B, -1); - ACE_NEW_RETURN (this->fdev_, - FTP_Server_FDev, - -1); + ACE_NEW_RETURN (this->fep_b_, FTP_Server_FlowEndPoint, -1); - this->fdev_->flowname ("Data"); - - AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + sep_b_ = this->streamendpoint_b_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; + + fep_b_obj_ = this->fep_b_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + CORBA::String_var s1 = sep_b_->add_fep( fep_b_obj_.in() ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - if (CORBA::is_nil (fdev.in ())) - cout << "FDev is nil" << endl; - - if (CORBA::is_nil (mmdevice.in ())) - cout << "MMDevice is nil" << endl; + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Added flowendpoint named: %s\n", s1.in() )); - mmdevice->add_fdev (fdev.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Register the mmdevice with the naming service. - CosNaming::Name server_mmdevice_name (1); - server_mmdevice_name.length (1); - server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice"); + CosNaming::Name server_sep_b_name (1); + server_sep_b_name.length (1); + server_sep_b_name [0].id = CORBA::string_dup ("Server_StreamEndPoint_b"); // Register the video control object with the naming server. - this->my_naming_client_->rebind (server_mmdevice_name, - mmdevice.in () + this->my_naming_client_->rebind (server_sep_b_name, + sep_b_.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + + } ACE_CATCHANY { @@ -209,9 +201,15 @@ Server::parse_args (int argc,char **argv) this->protocol_ = ACE_OS::strdup (opts.opt_arg ()); break; default: - ACE_ERROR_RETURN ((LM_ERROR,"Usage: server -f filename"),-1); + ACE_ERROR_RETURN ((LM_ERROR,"Usage: server -f filename\n"),-1); } } + + if( ! this->fp_ ) + { + ACE_ERROR_RETURN ((LM_ERROR, "Invalid file!\nUsage: server -f filename\n"),-1); + } + return 0; } @@ -269,10 +267,8 @@ main (int argc, template class ACE_Singleton <Server,ACE_Null_Mutex>; template class TAO_AV_Endpoint_Reactive_Strategy_B <TAO_StreamEndPoint_B,TAO_VDev,AV_Null_MediaCtrl>; template class TAO_AV_Endpoint_Reactive_Strategy <TAO_StreamEndPoint_B,TAO_VDev,AV_Null_MediaCtrl>; -template class TAO_FDev <TAO_FlowProducer, FTP_Server_FlowEndPoint>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) s#pragma instantiate ACE_Singleton <Server,ACE_Null_Mutex> #pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_B <TAO_StreamEndPoint_B,TAO_VDev,AV_Null_MediaCtrl> #pragma instantiate TAO_AV_Endpoint_Reactive_Strategy <TAO_StreamEndPoint_B,TAO_VDev,AV_Null_MediaCtrl> -#pragma instantiate TAO_FDev <TAO_FlowProducer, FTP_Server_FlowEndPoint> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.h b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.h index ea1d08e2826..8ce2dc595c5 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.h +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.h @@ -35,7 +35,6 @@ public: TAO_AV_Callback *&callback); }; -typedef TAO_FDev <TAO_FlowProducer, FTP_Server_FlowEndPoint> FTP_Server_FDev; class Server { @@ -55,12 +54,14 @@ protected: int parse_args (int argc,char **argv); TAO_Naming_Client my_naming_client_; TAO_AV_Endpoint_Reactive_Strategy_B <TAO_StreamEndPoint_B,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_; - TAO_MMDevice *mmdevice_; - FTP_Server_FDev *fdev_; FILE *fp_; char *protocol_; CORBA::ORB_var orb_; PortableServer::POA_ptr poa_; + TAO_StreamEndPoint_B *streamendpoint_b_; + AVStreams::StreamEndPoint_B_var sep_b_; + FTP_Server_FlowEndPoint *fep_b_; + AVStreams::FlowConsumer_var fep_b_obj_; }; typedef ACE_Singleton<Server,ACE_Null_Mutex> FTP_SERVER; diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp index b993be2173e..f02e89b5532 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp @@ -12,8 +12,8 @@ ACE_RCSID(Latency, ping, "$Id$") const char *ping_ior = CORBA::string_dup ("file://ping.ior"); const char *pong_ior = CORBA::string_dup ("file://pong.ior"); -const char *ping_address = CORBA::string_dup ("224.9.9.2:12345"); -const char *pong_address = CORBA::string_dup ("224.9.9.2:23456"); +const char *ping_address = CORBA::string_dup ("localhost:12345"); +const char *pong_address = CORBA::string_dup ("localhost:23456"); const char *protocol = CORBA::string_dup ("UDP"); int milliseconds = 30000; @@ -80,9 +80,9 @@ int main (int argc, char *argv[]) ACE_TRY_NEW_ENV { - parse_args (argc, argv); CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + parse_args (argc, argv); CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); @@ -162,6 +162,8 @@ int main (int argc, char *argv[]) ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); + orb->shutdown (1 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; // flow_spec.length (0); // stream_control->stop (flow_spec ACE_ENV_ARG_PARAMETER); diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp index 81a7bfd315e..5ee9e4a3e1b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp @@ -78,13 +78,13 @@ parse_args (int argc, char *argv[]) if (ping_protocols.length () == 0) { ping_protocols.length (1); - ping_protocols[0] = CORBA::string_dup ("UDP=224.9.9.2:12345"); + ping_protocols[0] = CORBA::string_dup ("UDP=localhost:12345"); } if (pong_protocols.length () == 0) { pong_protocols.length (1); - pong_protocols[0] = CORBA::string_dup ("UDP=224.9.9.2:23456"); + pong_protocols[0] = CORBA::string_dup ("UDP=localhost:23456"); } // Indicates sucessful parsing of the command line @@ -95,11 +95,12 @@ int main (int argc, char *argv[]) { ACE_TRY_NEW_ENV { - parse_args (argc, argv); CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + parse_args (argc, argv); + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -302,6 +303,7 @@ Pong_Send_Callback::get_timeout (ACE_Time_Value *&tv, void *&) { // @@ ACE_NEW (tv, ACE_Time_Value (0, milliseconds * 1000)); + ACE_DEBUG ((LM_DEBUG,"Pong_Send_Callback::get_timeout\n")); tv = 0; } diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp index afe9369fdff..2c5e3ee0964 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp @@ -94,13 +94,13 @@ parse_args (int argc, char *argv[]) if (pong_protocols.length () == 0) { pong_protocols.length (1); - pong_protocols[0] = CORBA::string_dup ("UDP=224.9.9.2:23456"); + pong_protocols[0] = CORBA::string_dup ("UDP=localhost:23456"); } if (ping_protocols.length () == 0) { ping_protocols.length (1); - ping_protocols[0] = CORBA::string_dup ("UDP=224.9.9.2:12345"); + ping_protocols[0] = CORBA::string_dup ("UDP=localhost:12345"); } // Indicates sucessful parsing of the command line @@ -112,11 +112,12 @@ int main (int argc, char *argv[]) ACE_TRY_NEW_ENV { - parse_args (argc, argv); CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + parse_args (argc, argv); + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -191,7 +192,7 @@ int main (int argc, char *argv[]) ACE_TRY_CHECK; } - orb->run (); + orb->run ( ACE_ENV_SINGLE_ARG_PARAMETER ); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -335,7 +336,7 @@ Ping_Send_Callback::handle_timeout (void *) int result = this->protocol_object_->send_frame (&this->frame_); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, - "FTP_Client_Flow_Handler::send - %p\n", + "Ping_Send_Callback::handle_timeout - send_frame - %p\n", ""), -1); diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl index c98f2d1ab38..7923bb727d8 100755 --- a/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl @@ -43,24 +43,16 @@ if (PerlACE::waitforfile_timed ($pongior, 20) == -1) { print STDERR "Starting Control\n"; -$control = $CTRL->SpawnWaitKill (200); +$CTRL->Spawn(); -if ($control != 0) { - print STDERR "ERROR: control returned $control\n"; - $status = 1; -} +$PING->WaitKill(100); -$pi = $PING->TerminateWaitKill (5); +$PONG->WaitKill(100); -if ($pi != 0) { - print STDERR "ERROR: ping returned $pi\n"; - $status = 1; -} - -$po = $PONG->TerminateWaitKill (5); +$control = $CTRL->TerminateWaitKill (5); -if ($po != 0) { - print STDERR "ERROR: pong returned $po\n"; +if ($control != 0) { + print STDERR "ERROR: control returned $control\n"; $status = 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf index d96d4bfa632..55dab11ac36 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf +++ b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf @@ -1,5 +1,5 @@ # $Id$ # -static Advanced_Resource_Factory "-ORBresources global -ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" +static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp index 3aadac1d90d..91ac8239ef3 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp @@ -279,6 +279,7 @@ Client::run (void) &addr); flow_spec [0] = entry.entry_to_string (); flow_spec.length (1); + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Flowspec: %s\n", entry.entry_to_string()); AVStreams::MMDevice_var client_mmdevice = this->client_mmdevice_._this (ACE_ENV_SINGLE_ARG_PARAMETER); diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp index 34e36546e21..034b677928a 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp @@ -29,8 +29,9 @@ int FTP_Client_Callback::handle_timeout (void *) { ACE_Message_Block mb (BUFSIZ); - ACE_DEBUG ((LM_DEBUG,"FTP_Client_Callback::get_frame")); + ACE_DEBUG ((LM_DEBUG,"FTP_Client_Callback::get_frame\n")); char *buf = mb.rd_ptr (); + int n = ACE_OS::fread(buf,1,mb.size (),CLIENT::instance ()->file ()); if (n < 0) { @@ -48,11 +49,6 @@ FTP_Client_Callback::handle_timeout (void *) { ACE_DEBUG ((LM_DEBUG,"handle_timeout:End of file\n")); AVStreams::flowSpec stop_spec (1); - //ACE_DECLARE_NEW_CORBA_ENV; - CLIENT::instance ()->streamctrl ()->stop (stop_spec ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - // CLIENT::instance ()->streamctrl ()->destroy (stop_spec ACE_ENV_ARG_PARAMETER); - //ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Just before Orb Shutdown\n")); TAO_AV_CORE::instance ()->orb ()->shutdown (0); ACE_TRY_CHECK; @@ -251,7 +247,7 @@ Client::init (int argc,char **argv) this->parse_args (this->argc_, this->argv_); - ACE_DEBUG ((LM_DEBUG, "Parsed Address TWO%s\n", this->address_)); + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Parsed Address %s\n", this->address_)); ACE_NEW_RETURN (this->fdev_, FTP_Client_FDev, @@ -306,16 +302,17 @@ Client::run (void) AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); AVStreams::flowSpec flow_spec (1); // Bind the client and server mmdevices. - ACE_DEBUG ((LM_DEBUG, "Parsed Address ONE%s\n", this->address_)); - ACE_INET_Addr addr (this->address_); + ACE_DEBUG ((LM_DEBUG, "(%N,%l) Parsed Address %s\n", this->address_)); + ACE_INET_Addr *addr = new ACE_INET_Addr(this->address_); TAO_Forward_FlowSpec_Entry entry (this->flowname_, "IN", "USER_DEFINED", flow_protocol_str, this->protocol_, - &addr); - flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); + addr); + ACE_DEBUG ((LM_DEBUG, "(%N,%l) flowspec: %s\n", entry.entry_to_string() )); flow_spec.length (1); + flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); AVStreams::MMDevice_var client_mmdevice = this->client_mmdevice_._this (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -328,7 +325,7 @@ Client::run (void) flow_spec ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Suuceessful ONE\n")); + if (result == 0) ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind_devs for client_mmdevice failed\n"),-1); if (this->bind_to_server ("Server_MMDevice1") == -1) @@ -342,10 +339,8 @@ Client::run (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Suuceessful TWO\n")); - if (result == 0) - ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind_devs for mmdevice 1 failed\n"),-1); + ACE_ERROR_RETURN ((LM_ERROR,"(%N,%l) streamctrl::bind_devs for mmdevice 1 failed\n"),-1); ACE_TRY_CHECK; if (this->bind_to_server ("Server_MMDevice2") == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -357,9 +352,9 @@ Client::run (void) flow_spec ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Suuceessful THREE\n")); + if (result == 0) - ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind_devs for mmdevice 2 failed\n"),-1); + ACE_ERROR_RETURN ((LM_ERROR,"(%N,%l) streamctrl::bind_devs for mmdevice 2 failed\n"),-1); AVStreams::flowSpec start_spec (1); start_spec.length (1); start_spec [0] = CORBA::string_dup (this->flowname_); diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp index edd7fc4eaae..c943eaa4c80 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp @@ -38,7 +38,7 @@ FTP_Server_FlowEndPoint::get_callback (const char *, int FTP_Server_Callback::handle_stop (void) { - ACE_DEBUG ((LM_DEBUG,"FTP_Server_Callback::stop")); + ACE_DEBUG ((LM_DEBUG,"FTP_Server_Callback::stop\n")); ACE_OS::fclose (FTP_SERVER::instance ()->file ()); TAO_AV_CORE::instance ()->orb ()->shutdown (); return 0; |