diff options
author | okellogg <okellogg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-08 15:13:54 +0000 |
---|---|---|
committer | okellogg <okellogg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-08 15:13:54 +0000 |
commit | 15b2fcd5542781fddd8ab69e548764841a88a2e6 (patch) | |
tree | cff7603415873226dab157ce8947324107f0ed67 | |
parent | 708d73be50f8d9e2f0df7d4a77a40046ec75638a (diff) | |
download | ATCD-15b2fcd5542781fddd8ab69e548764841a88a2e6.tar.gz |
TAO_1_2_1 merge
15 files changed, 366 insertions, 366 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp index 6bceacbf55b..7c8defb9058 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp @@ -26,7 +26,7 @@ Receiver_StreamEndPoint::get_callback (const char *, int Receiver_StreamEndPoint::set_protocol_object (const char * flowname, - TAO_AV_Protocol_Object *object) + TAO_AV_Protocol_Object *object) { // Set the sender protocol object corresponding to the transport // protocol selected. @@ -70,17 +70,17 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, frame = frame->cont (); } - + // Read from the file into a message block. int n = ACE_OS::fread (this->mb_.wr_ptr (), - 1, - this->mb_.size (), - RECEIVER::instance ()->input_file ()); - + 1, + this->mb_.size (), + RECEIVER::instance ()->input_file ()); + if (n < 0) ACE_DEBUG ((LM_DEBUG, - "Receiver::receive_frame fread failed\n")); - + "Receiver::receive_frame fread failed\n")); + if (n == 0) { // At end of file break the loop and end the sender. @@ -89,15 +89,15 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, else { this->mb_.wr_ptr (n); - + // Send frame. int result = - RECEIVER::instance ()->protocol_object ()->send_frame (&this->mb_); - + RECEIVER::instance ()->protocol_object ()->send_frame (&this->mb_); + if (result < 0) - ACE_DEBUG ((LM_DEBUG, - "Send Frame Failed\n")); - + ACE_DEBUG ((LM_DEBUG, + "Send Frame Failed\n")); + // Reset the message block. this->mb_.reset (); } @@ -117,18 +117,18 @@ Receiver_Callback::handle_destroy (void) if (count < 2) { ACE_TRY_NEW_ENV - { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Receiver_Callback::handle_destroy Failed\n"); + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Receiver_Callback::handle_destroy Failed\n"); return -1; - - } + + } ACE_ENDTRY; } @@ -160,7 +160,7 @@ Receiver::protocol_object (TAO_AV_Protocol_Object *object) int Receiver::parse_args (int argc, - char **argv) + char **argv) { // Parse command line arguments ACE_Get_Opt opts (argc, argv, "f:r:d"); @@ -189,8 +189,8 @@ Receiver::parse_args (int argc, int Receiver::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -205,7 +205,7 @@ Receiver::init (int argc, argv); if (result != 0) return result; - + // Open file to read. this->input_file_ = ACE_OS::fopen (this->filename_.c_str (), @@ -230,7 +230,7 @@ Receiver::init (int argc, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -248,8 +248,8 @@ Receiver::init (int argc, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -278,32 +278,32 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. - TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in (), ACE_TRY_ENV); + TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Make sure we have a valid <output_file> output_file = ACE_OS::fopen (output_file_name, "w"); @@ -319,24 +319,24 @@ main (int argc, int result = RECEIVER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // // Start sending data. - // result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + // result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); // ACE_TRY_CHECK; - + if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + // Hack for now.... ACE_OS::sleep (1); - - //orb->destroy (ACE_TRY_ENV); + + //orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h index 4511d5f7710..8050232c5b7 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h @@ -49,7 +49,7 @@ public: private: int frame_count_; // Keeping a count of the incoming frames. - + ACE_Message_Block mb_; // Message block into which data is read from a file and then sent. }; @@ -93,8 +93,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -130,7 +130,7 @@ protected: ACE_CString filename_; // File from which data is read. - + int parse_args (int argc, char **argv); // Method to parse the command line arguments. diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl index 28372903db4..e5b712073f8 100755 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp index 63dab991dd3..bdc873a3ac6 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp @@ -42,8 +42,8 @@ Sender_Callback::Sender_Callback (void) int Sender_Callback::receive_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *, - const ACE_Addr &) + TAO_AV_frame_info *, + const ACE_Addr &) { // // Upcall from the AVStreams when there is data to be received from @@ -52,7 +52,7 @@ Sender_Callback::receive_frame (ACE_Message_Block *frame, ACE_DEBUG ((LM_DEBUG, "Sender_Callback::receive_frame for frame %d\n", this->frame_count_++)); - + while (frame != 0) { // Write the received data to the file. @@ -108,15 +108,15 @@ Sender::shutdown (void) ACE_DECLARE_NEW_CORBA_ENV; // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + } int @@ -153,7 +153,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -162,13 +162,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -181,8 +181,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -219,9 +219,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -263,7 +263,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -278,8 +278,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -292,7 +292,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -330,7 +330,7 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) { // At end of file break the loop and end the sender. ACE_DEBUG ((LM_DEBUG,"Handle_Start:End of file\n")); - this->eof_ = 1; + this->eof_ = 1; break; } @@ -369,8 +369,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -399,13 +399,13 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. //TAO_AV_CORE::instance ()->orb ()->shutdown (1, - // ACE_TRY_ENV); + // TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -428,42 +428,42 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. /* TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); */ + root_poa.in () + TAO_ENV_ARG_PARAMETER); */ ACE_TRY_CHECK; // Initialize the AVStreams components. - TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in (), ACE_TRY_ENV); + TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -483,9 +483,9 @@ main (int argc, else ACE_DEBUG ((LM_DEBUG, "File Opened Successfull\n")); - + // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_Time_Value tv(3,0); orb->run (tv); diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h index 8188b7f49f7..fbe82c9e994 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h @@ -89,25 +89,25 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); // Set the protocol object corresponding to the transport protocol chosen. int eof (void); - + void shutdown (void); private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; @@ -145,6 +145,6 @@ private: TAO_AV_Protocol_Object *protocol_object_; // Protocol object corresponding to the transport protocol selected. - + int eof_; }; diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp index 4106f1c5e07..2219157b301 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp @@ -15,9 +15,9 @@ Receiver_StreamEndPoint::get_callback (const char *flow_name, { Receiver_Callback *callback_; ACE_NEW_RETURN (callback_, - Receiver_Callback, - -1); - + Receiver_Callback, + -1); + // Return the receiver application callback to the AVStreams for // future upcalls. callback = callback_; @@ -28,7 +28,7 @@ Receiver_StreamEndPoint::get_callback (const char *flow_name, int Receiver_StreamEndPoint::set_protocol_object (const char * flowname, - TAO_AV_Protocol_Object *object) + TAO_AV_Protocol_Object *object) { // Set the sender protocol object corresponding to the transport // protocol selected. @@ -42,28 +42,28 @@ Receiver_Callback::Receiver_Callback (void) mb_ (BUFSIZ) { ACE_DEBUG ((LM_DEBUG, - "Receiver_Callback::Receiver_Callback\n")); + "Receiver_Callback::Receiver_Callback\n")); } void Receiver_Callback::flowname (const char* flow_name) { this->flowname_ = flow_name; - + // Make sure we have a valid <output_file> this->output_file_ = ACE_OS::fopen (this->flowname_.c_str (), - "w"); + "w"); if (this->output_file_ == 0) ACE_ERROR ((LM_DEBUG, - "Cannot open output file %s\n", - this->flowname_.c_str ())); - + "Cannot open output file %s\n", + this->flowname_.c_str ())); + else ACE_DEBUG ((LM_DEBUG, - "%s File Opened Successfully\n", - this->flowname_.c_str ())); - - + "%s File Opened Successfully\n", + this->flowname_.c_str ())); + + } int @@ -78,7 +78,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, ACE_DEBUG ((LM_DEBUG, "Receiver_Callback::receive_frame for frame %d for flow %s\n", this->frame_count_++, - this->flowname_.c_str ())); + this->flowname_.c_str ())); while (frame != 0) { @@ -96,7 +96,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, frame = frame->cont (); } - + return 0; } @@ -135,7 +135,7 @@ Receiver::protocol_object (TAO_AV_Protocol_Object *object) int Receiver::parse_args (int argc, - char **argv) + char **argv) { // Parse command line arguments ACE_Get_Opt opts (argc, argv, "f:r:d"); @@ -164,8 +164,8 @@ Receiver::parse_args (int argc, int Receiver::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -180,7 +180,7 @@ Receiver::init (int argc, argv); if (result != 0) return result; - + // Register the receiver mmdevice object with the ORB ACE_NEW_RETURN (this->mmdevice_, @@ -192,7 +192,7 @@ Receiver::init (int argc, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -210,8 +210,8 @@ Receiver::init (int argc, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -234,53 +234,53 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = RECEIVER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + if (result != 0) return result; - + while (endstream != 2) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } // Hack for now.... ACE_OS::sleep (1); - - orb->destroy (ACE_TRY_ENV); + + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h index 45d6b6586a4..b15d676d68f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h @@ -47,11 +47,11 @@ public: int handle_destroy (void); void flowname (const char*); - + private: int frame_count_; // Keeping a count of the incoming frames. - + ACE_Message_Block mb_; // Message block into which data is read from a file and then sent. @@ -96,8 +96,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -128,7 +128,7 @@ protected: ACE_CString filename_; // File from which data is read. - + int parse_args (int argc, char **argv); // Method to parse the command line arguments. diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl index 3f07d66d5c9..6d63232651b 100755 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp index fbdb0919dbb..52d9ea10836 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp @@ -55,15 +55,15 @@ Sender::shutdown (void) ACE_DECLARE_NEW_CORBA_ENV; // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + } int @@ -100,7 +100,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -109,13 +109,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -128,8 +128,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -166,9 +166,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -210,7 +210,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -225,8 +225,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -239,7 +239,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -316,8 +316,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -325,31 +325,31 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Start timer before sending the frame. elapsed_timer.start (); - ProtocolObject_SetItor end = this->protocol_object_.end (); - for (ProtocolObject_SetItor begin = this->protocol_object_.begin (); - begin != end; ++begin) - { - // Send frame. - int result = - (*begin)->send_frame (&this->mb_); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "send failed:%p", - "Sender::pace_data send\n"), - -1); - } - - + ProtocolObject_SetItor end = this->protocol_object_.end (); + for (ProtocolObject_SetItor begin = this->protocol_object_.begin (); + begin != end; ++begin) + { + // Send frame. + int result = + (*begin)->send_frame (&this->mb_); + + if (result < 0) + ACE_ERROR_RETURN ((LM_ERROR, + "send failed:%p", + "Sender::pace_data send\n"), + -1); + } + + ACE_DEBUG ((LM_DEBUG, "Sender::pace_data frame %d was sent succesfully\n", ++this->frame_count_)); - + // Reset the message block. this->mb_.reset (); - + } // end while - + this->shutdown (); } ACE_CATCHANY @@ -372,38 +372,38 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -412,7 +412,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h index a95d6827065..50e1c1fb481 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h @@ -65,11 +65,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -81,7 +81,7 @@ private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; @@ -119,5 +119,5 @@ private: ProtocolObject_Set protocol_object_; // Protocol object corresponding to the transport protocol selected. - + }; diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp index 1004ea6ffa3..2a6a7dbb84b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp @@ -6,19 +6,19 @@ //TimeStamp Protocol Object TimeStamp_Protocol_Object::TimeStamp_Protocol_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport) + TAO_AV_Transport *transport) :TAO_AV_Protocol_Object (callback,transport) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Object::TimeStamp_Protocol_Object\n")); + "TimeStamp_Protocol_Object::TimeStamp_Protocol_Object\n")); ACE_NEW (this->frame_, - ACE_Message_Block); + ACE_Message_Block); this->frame_->size (4 * this->transport_->mtu ()); } - -int + +int TimeStamp_Protocol_Object::handle_input (void) { int n = this->transport_->recv (this->frame_->rd_ptr (), @@ -28,11 +28,11 @@ TimeStamp_Protocol_Object::handle_input (void) if (n == -1) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_UDP_Flow_Handler::handle_input connection closed\n"),-1); this->frame_->wr_ptr (this->frame_->rd_ptr () + n); - + return this->callback_->receive_frame (this->frame_); } -// int +// int // TimeStamp_Protocol_Object::handle_input (void) // { // iovec iov; @@ -40,125 +40,125 @@ TimeStamp_Protocol_Object::handle_input (void) // int n = this->transport_->recv (&iov, iovcnt); // int frame_size = BUFSIZ; - + // int begin = 1; // ACE_Message_Block* prev; // int iov_base = 0; // while (n >= frame_size) // { // ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d %d\n", -// n, -// frame_size)); +// "(%N|%l) Frame Size %d %d\n", +// n, +// frame_size)); // ACE_Message_Block* mb; // ACE_NEW_RETURN (mb, -// ACE_Message_Block(frame_size), -// -1); +// ACE_Message_Block(frame_size), +// -1); // ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, frame_size); // mb->wr_ptr (mb->rd_ptr () + frame_size); // // iov_base += frame_size; - + // n -= frame_size; // if (begin) -// { -// prev = mb; -// this->frame_ = mb; -// begin = 0; -// } -// else -// { -// prev->cont (mb); -// prev = mb; - -// } +// { +// prev = mb; +// this->frame_ = mb; +// begin = 0; // } - +// else +// { +// prev->cont (mb); +// prev = mb; + +// } +// } + // if (n > 0) // if (begin) // { -// ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d\n", -// n)); -// ACE_OS_String::memmove (this->frame_->rd_ptr (), iov.iov_base, n); -// this->frame_->wr_ptr (this->frame_->rd_ptr () + n); +// ACE_DEBUG ((LM_DEBUG, +// "(%N|%l) Frame Size %d\n", +// n)); +// ACE_OS_String::memmove (this->frame_->rd_ptr (), iov.iov_base, n); +// this->frame_->wr_ptr (this->frame_->rd_ptr () + n); // } -// else +// else // { -// ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d\n", -// n)); - -// ACE_Message_Block* mb; -// ACE_NEW_RETURN (mb, -// ACE_Message_Block (frame_size), -// -1); - -// ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, n); -// mb->wr_ptr (mb->rd_ptr () + n); -// prev->cont (mb); +// ACE_DEBUG ((LM_DEBUG, +// "(%N|%l) Frame Size %d\n", +// n)); + +// ACE_Message_Block* mb; +// ACE_NEW_RETURN (mb, +// ACE_Message_Block (frame_size), +// -1); + +// ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, n); +// mb->wr_ptr (mb->rd_ptr () + n); +// prev->cont (mb); // } - + // ACE_DEBUG ((LM_DEBUG, -// "IOVEC SIZE %d %d\n", -// n, -// iov.iov_len)); +// "IOVEC SIZE %d %d\n", +// n, +// iov.iov_len)); // if (n == -1) // ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input recv failed\n"),-1); // if (n == 0) // ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input connection closed\n"),-1); - + // return this->callback_->receive_frame (this->frame_); // } - + /// send a data frame. -int +int TimeStamp_Protocol_Object::send_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *) + TAO_AV_frame_info *) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Object::send_frame\n")); - + "TimeStamp_Protocol_Object::send_frame\n")); + ACE_Message_Block* timestamp; ACE_NEW_RETURN (timestamp, - ACE_Message_Block (BUFSIZ), - -1); + ACE_Message_Block (BUFSIZ), + -1); ACE_hrtime_t now = ACE_OS::gethrtime (); - + ACE_UINT64 usec = now; ACE_UINT32 val_1 = ACE_CU64_TO_CU32 (usec); ACE_DEBUG ((LM_DEBUG, - "Time Stamp %u usecs\n", - val_1)); + "Time Stamp %u usecs\n", + val_1)); ACE_OS_String::memcpy (timestamp->wr_ptr (), &now, sizeof (now)); timestamp->wr_ptr (sizeof (now)); - + frame->cont (timestamp); - + int result = this->transport_->send (frame); if (result < 0) return result; return 0; } - -int + +int TimeStamp_Protocol_Object::send_frame (iovec const* iov, - int iovcnt, - TAO_AV_frame_info *) + int iovcnt, + TAO_AV_frame_info *) { return this->transport_->send (iov,iovcnt); } -int +int TimeStamp_Protocol_Object::send_frame (const char* buf, - size_t len) + size_t len) { int result = this->transport_->send (buf, len, 0); if (result < 0) @@ -167,7 +167,7 @@ TimeStamp_Protocol_Object::send_frame (const char* buf, } /// end the stream. -int +int TimeStamp_Protocol_Object::destroy (void) { this->callback_->handle_destroy (); @@ -187,35 +187,35 @@ int TimeStamp_Protocol_Factory::init (int, char **) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Factory::init\n")); + "TimeStamp_Protocol_Factory::init\n")); return 0; } -int +int TimeStamp_Protocol_Factory::match_protocol (const char *flow_string) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Factory::match_protocol\n")); + "TimeStamp_Protocol_Factory::match_protocol\n")); if (ACE_OS::strcasecmp (flow_string,"TS") == 0) return 1; return 0; } -TimeStamp_Protocol_Object* +TimeStamp_Protocol_Object* TimeStamp_Protocol_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, - TAO_Base_StreamEndPoint *endpoint, - TAO_AV_Flow_Handler *handler, - TAO_AV_Transport *transport) + TAO_Base_StreamEndPoint *endpoint, + TAO_AV_Flow_Handler *handler, + TAO_AV_Transport *transport) { TAO_AV_Callback *callback = 0; endpoint->get_callback (entry->flowname (), callback); - - + + TimeStamp_Protocol_Object *object = 0; ACE_NEW_RETURN (object, TimeStamp_Protocol_Object (callback, - transport), + transport), 0); callback->open (object, handler); diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h index 2f7b2fc46be..7ee8b1c4f84 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h @@ -11,28 +11,28 @@ class TAO_AV_Export TimeStamp_Protocol_Object : public TAO_AV_Protocol_Object { public: TimeStamp_Protocol_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport); - + TAO_AV_Transport *transport); + virtual int handle_input (void); - + /// send a data frame. virtual int send_frame (ACE_Message_Block *frame, TAO_AV_frame_info *frame_info = 0); - + virtual int send_frame (iovec const* iov, int iovcnt, TAO_AV_frame_info *frame_info = 0); virtual int send_frame (const char*buf, size_t len); - + /// end the stream. virtual int destroy (void); private: /// Pre-allocated memory to receive the data... ACE_Message_Block* frame_; - + }; class TAO_AV_Export TimeStamp_Protocol_Factory : public TAO_AV_Flow_Protocol_Factory @@ -44,15 +44,15 @@ class TAO_AV_Export TimeStamp_Protocol_Factory : public TAO_AV_Flow_Protocol_Fac virtual int init (int argc, char *argv[]); virtual int match_protocol (const char *flow_string); virtual TimeStamp_Protocol_Object* make_protocol_object (TAO_FlowSpec_Entry *entry, - TAO_Base_StreamEndPoint *endpoint, - TAO_AV_Flow_Handler *handler, - TAO_AV_Transport *transport); + TAO_Base_StreamEndPoint *endpoint, + TAO_AV_Flow_Handler *handler, + TAO_AV_Transport *transport); }; ACE_STATIC_SVC_DECLARE (TimeStamp_Protocol_Factory) ACE_FACTORY_DECLARE (TAO_AV, TimeStamp_Protocol_Factory) -#include "ace/post.h" +#include "ace/post.h" #endif /*TIMESTAMP_H*/ diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp index 706f47e93c6..f5ef0bf7a7b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp @@ -46,26 +46,26 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, // Write the received data to the file. size_t result = ACE_OS::fwrite (frame->rd_ptr (), - frame_size, - 1, - output_file); - + frame_size, + 1, + output_file); + if (result == frame->length ()) ACE_ERROR_RETURN ((LM_ERROR, - "Receiver_Callback::fwrite failed\n"), - -1); + "Receiver_Callback::fwrite failed\n"), + -1); frame->rd_ptr (frame_size); ACE_hrtime_t stamp; ACE_OS_String::memcpy (&stamp, frame->rd_ptr (), sizeof (stamp)); - + ACE_UINT64 usec = stamp; ACE_UINT32 val_1 = ACE_CU64_TO_CU32 (usec); - + ACE_DEBUG ((LM_DEBUG, - "Time Stamp %u\n", - val_1)); - + "Time Stamp %u\n", + val_1)); + frame->reset (); return 0; } @@ -92,8 +92,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -112,7 +112,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -130,8 +130,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -177,32 +177,32 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -228,23 +228,23 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - + while (!endstream) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl index 3f07d66d5c9..6d63232651b 100755 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp index 04d695b79a9..2161de268e9 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp @@ -82,7 +82,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -91,13 +91,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -110,8 +110,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -148,9 +148,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -182,7 +182,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -197,8 +197,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -211,7 +211,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -288,8 +288,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -318,13 +318,13 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -350,38 +350,38 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -390,7 +390,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY |