summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp66
1 files changed, 21 insertions, 45 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp
index 3683e3e7ba2..e9f0cf29f1c 100644
--- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp
@@ -116,21 +116,18 @@ Receiver_Callback::handle_destroy (void)
if (count < 2)
{
- ACE_TRY_NEW_ENV
+ try
{
- TAO_AV_CORE::instance ()->orb ()->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ TAO_AV_CORE::instance ()->orb ()->shutdown (0);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Receiver_Callback::handle_destroy Failed\n");
+ ex._tao_print_exception (
+ "Receiver_Callback::handle_destroy Failed\n");
return -1;
}
- ACE_ENDTRY;
}
return 0;
@@ -189,8 +186,7 @@ Receiver::parse_args (int argc,
int
Receiver::init (int argc,
- char ** argv
- ACE_ENV_ARG_DECL)
+ char ** argv)
{
// Initialize the endpoint strategy with the orb and poa.
int result =
@@ -230,8 +226,7 @@ Receiver::init (int argc,
this->mmdevice_;
CORBA::Object_var mmdevice =
- this->mmdevice_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->mmdevice_->_this ();
// Register the mmdevice with the naming service.
CosNaming::Name name (1);
@@ -248,9 +243,7 @@ Receiver::init (int argc,
// Register the receiver object with the naming server.
this->naming_client_->rebind (name,
- mmdevice.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ mmdevice.in ());
return 0;
}
@@ -271,38 +264,28 @@ int
main (int argc,
char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Initialize the ORB first.
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ 0);
CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ = orb->resolve_initial_references ("RootPOA");
// Get the POA_var object from Object_var.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var mgr
- = root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ = root_poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// Initialize the AVStreams components.
- TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in ());
// Make sure we have a valid <output_file>
output_file = ACE_OS::fopen (output_file_name,
@@ -319,33 +302,26 @@ main (int argc,
int result =
RECEIVER::instance ()->init (argc,
- argv
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ argv);
// // Start sending data.
- // result = SENDER::instance ()->pace_data (ACE_ENV_SINGLE_ARG_PARAMETER);
- // ACE_TRY_CHECK;
+ // result = SENDER::instance ()->pace_data ();
if (result != 0)
return result;
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
// Hack for now....
ACE_OS::sleep (1);
- //orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ //orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"receiver::init");
+ ex._tao_print_exception ("receiver::init");
return -1;
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
ACE_OS::fclose (output_file);