diff options
author | fhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-29 14:10:11 +0000 |
---|---|---|
committer | fhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-29 14:10:11 +0000 |
commit | dd060e7104ee9b3bb5c6393e9b55ae8ed7ce533d (patch) | |
tree | 0818e65925d8b3921ff6f8a57ea31a7216a56c8f /TAO/orbsvcs | |
parent | 5c960e64192114ac265ce28e47ccef334098894a (diff) | |
download | ATCD-dd060e7104ee9b3bb5c6393e9b55ae8ed7ce533d.tar.gz |
ChangeLogTag: Fri Dec 29 07:38:27 2000 Frank Hunleth <fhunleth@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp | 37 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp | 32 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp | 25 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp | 21 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp | 16 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp | 31 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Interoperable_Naming/client.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Time/Client_i.cpp | 160 |
10 files changed, 193 insertions, 166 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp index 8068a729357..0a3097e33f5 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp @@ -38,7 +38,7 @@ FTP_Client_Callback::handle_timeout (void *) { ACE_ERROR_RETURN ((LM_ERROR,"FTP_Client_Flow_Handler::fread end of file\n"),-1); } - + if (n == 0) { if (feof (CLIENT::instance ()->file ())) @@ -240,12 +240,12 @@ Client::init (int argc,char **argv) ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - + PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + this->parse_args (this->argc_, this->argv_); ACE_NEW_RETURN (this->fdev_, @@ -274,12 +274,12 @@ Client::init (int argc,char **argv) -1); this->fp_ = ACE_OS::fopen (this->filename_,"r"); - + if (this->fp_ != 0) { 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"), @@ -344,7 +344,7 @@ Client::run (void) if (this->orb_->run (tv) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - + ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); } ACE_CATCHANY @@ -364,45 +364,46 @@ main (int argc, ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - - + + int result = 0; result = CLIENT::instance ()->init (argc,argv); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"client::init failed\n"),1); result = CLIENT::instance ()->run (); - + poa->destroy (1, 1, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - + orb->destroy (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - + if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"client::run failed\n"),1); - + } ACE_CATCHANY - + { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Client Failed\n"); return -1; } ACE_ENDTRY; ACE_CHECK_RETURN (-1); - + + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp index 0ea7b2357a0..4a49a9a6dcf 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp @@ -75,7 +75,7 @@ FTP_Server_Callback::handle_end_stream (void) } Server::Server (void) - :reactive_strategy_ (TAO_AV_CORE::instance ()->orb (), TAO_AV_CORE::instance ()->poa ()), + :reactive_strategy_ (TAO_AV_CORE::instance ()->orb (), TAO_AV_CORE::instance ()->poa ()), orb_ (TAO_AV_CORE::instance ()->orb ()), poa_ (TAO_AV_CORE::instance ()->poa ()) { @@ -106,13 +106,13 @@ Server::init (int argc, { PortableServer::POAManager_var mgr = this->poa_->the_POAManager (); - + mgr->activate (); - + int result = this->parse_args (argc,argv); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR,"parse args failed\n"),-1); - + // Initialize the naming services if (my_naming_client_.init (this->orb_.in ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -128,15 +128,15 @@ Server::init (int argc, ACE_NEW_RETURN (this->fdev_, FTP_Server_FDev, -1); - + this->fdev_->flowname ("Data"); - + AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (ACE_TRY_ENV); ACE_TRY_CHECK; - + AVStreams::FDev_var fdev = this->fdev_->_this (ACE_TRY_ENV); ACE_TRY_CHECK; - + if (CORBA::is_nil (fdev.in ())) cout << "FDev is nil" << endl; @@ -224,12 +224,12 @@ main (int argc, char **argv) { int result = 0; - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); @@ -249,16 +249,18 @@ main (int argc, } ACE_ENDTRY; ACE_CHECK_RETURN (-1); - + result = FTP_SERVER::instance ()->init (argc,argv); - + if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"SERVER::init failed\n"),1); - + result = FTP_SERVER::instance ()->run (); - + if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"SERVER::run failed\n"),1); + + return result; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp index 3d9699eafe6..c4a036353ee 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp @@ -222,31 +222,31 @@ Client::bind_to_server (const char *name) int Client::init (int argc,char **argv) { - + PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + this->argc_ = argc; this->argv_ = argv; // Increase the debug_level so that we can see the output // TAO_debug_level++; this->parse_args (this->argc_, this->argv_); - + if (this->my_naming_client_.init (TAO_AV_CORE::instance ()->orb ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize " "the TAO_Naming_Client. \n"), -1); - + this->fp_ = ACE_OS::fopen (this->filename_,"r"); if (this->fp_ != 0) { ACE_DEBUG ((LM_DEBUG,"file opened successfully\n")); } - + return 0; } @@ -321,7 +321,7 @@ Client::run (void) if (TAO_AV_CORE::instance ()->orb ()->run (tv) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - + ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); } ACE_CATCHANY @@ -341,14 +341,14 @@ main (int argc, ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); @@ -363,14 +363,15 @@ main (int argc, ACE_ERROR_RETURN ((LM_ERROR,"client::run failed\n"),1); } ACE_CATCHANY - + { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Client Failed\n"); return -1; } ACE_ENDTRY; ACE_CHECK_RETURN (-1); - + + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp index 498c946db0c..0f3fb5da6db 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp @@ -55,7 +55,7 @@ FTP_Server_Callback::handle_end_stream (void) } Server::Server (void) - : reactive_strategy_ (TAO_AV_CORE::instance ()->orb (), + : reactive_strategy_ (TAO_AV_CORE::instance ()->orb (), TAO_AV_CORE::instance ()->poa ()) { } @@ -70,9 +70,9 @@ Server::init (int argc, PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + int result = this->parse_args (argc,argv); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR,"parse args failed\n"),-1); @@ -180,17 +180,17 @@ main (int argc, char **argv) { int result = 0; - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + ACE_DECLARE_NEW_CORBA_ENV; - + ACE_TRY { TAO_AV_CORE::instance ()->init (orb.in (), @@ -212,6 +212,8 @@ main (int argc, result = FTP_SERVER::instance ()->run (); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"FTP_SERVER::run failed\n"),1); + + return result; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp index e08e7d1a0bb..d35014a9fda 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp @@ -243,9 +243,9 @@ Client::init (int argc,char **argv) { PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + this->parse_args (this->argc_, this->argv_); ACE_NEW_RETURN (this->fdev_, @@ -356,7 +356,7 @@ Client::run (void) if (TAO_AV_CORE::instance ()->orb ()->run (tv) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - + ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); } ACE_CATCHANY @@ -373,17 +373,17 @@ int main (int argc, char *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + ACE_DECLARE_NEW_CORBA_ENV; - + ACE_TRY { TAO_AV_CORE::instance ()->init (orb.in (), @@ -398,7 +398,7 @@ main (int argc, } ACE_ENDTRY; ACE_CHECK_RETURN (-1); - + int result = 0; result = CLIENT::instance ()->init (argc,argv); if (result < 0) @@ -406,7 +406,8 @@ main (int argc, result = CLIENT::instance ()->run (); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"client::run failed\n"),1); - + + return result; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp index 579ea95f82e..8b45a2582c4 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp @@ -124,9 +124,9 @@ Server::init (int argc, PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + int result = this->parse_args (argc,argv); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR,"parse args failed\n"),-1); @@ -246,17 +246,17 @@ main (int argc, char **argv) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + ACE_DECLARE_NEW_CORBA_ENV; - + ACE_TRY { TAO_AV_CORE::instance ()->init (orb.in (), @@ -279,6 +279,8 @@ main (int argc, result = FTP_SERVER::instance ()->run (); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"FTP_SERVER::run failed\n"),1); + + return result; } diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp index 5ae92a248c5..31cba7ef728 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp @@ -265,24 +265,24 @@ Client::init (int argc,char **argv) CORBA::String_var ior; PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + this->parse_args (argc, argv); - + if (this->my_naming_client_.init (TAO_AV_CORE::instance ()->orb ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize " "the TAO_Naming_Client. \n"), -1); - + this->fp_ = ACE_OS::fopen (this->filename_,"r"); if (this->fp_ != 0) { 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"), @@ -372,14 +372,14 @@ main (int argc, ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); @@ -394,28 +394,29 @@ main (int argc, ACE_DEBUG ((LM_DEBUG, "Calibrating scale factory . . . ")); ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); ACE_DEBUG ((LM_DEBUG, "done\n")); - + recv_latency.dump_results ("Receive", gsf); - + send_latency.dump_results ("Send", gsf); poa->destroy (1, 1, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - + orb->destroy (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - + if (result < 0) ACE_ERROR_RETURN ((LM_ERROR,"client::run failed\n"),1); - + } ACE_CATCHANY - + { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Client Failed\n"); return -1; } ACE_ENDTRY; ACE_CHECK_RETURN (-1); + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp index c285adcc6a7..7a3b0448193 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp @@ -91,9 +91,9 @@ Server::init (int argc, { PortableServer::POAManager_var mgr = TAO_AV_CORE::instance ()->poa ()->the_POAManager (); - + mgr->activate (); - + int result = this->parse_args (argc,argv); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR,"parse args failed\n"),-1); @@ -109,7 +109,7 @@ Server::init (int argc, ACE_NEW_RETURN (this->mmdevice_, TAO_MMDevice (&this->reactive_strategy_), -1); - + // Register the mmdevice with the naming service. CosNaming::Name server_mmdevice_name (1); server_mmdevice_name.length (1); @@ -188,17 +188,17 @@ main (int argc, char **argv) { int result = 0; - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + ACE_DECLARE_NEW_CORBA_ENV; - + ACE_TRY { TAO_AV_CORE::instance ()->init (orb.in (), @@ -224,6 +224,7 @@ main (int argc, ACE_DEBUG ((LM_DEBUG, "done\n")); recv_latency.dump_results ("Receive", gsf); + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/orbsvcs/tests/Interoperable_Naming/client.cpp b/TAO/orbsvcs/tests/Interoperable_Naming/client.cpp index f5d9bdf39fd..20e475fa914 100644 --- a/TAO/orbsvcs/tests/Interoperable_Naming/client.cpp +++ b/TAO/orbsvcs/tests/Interoperable_Naming/client.cpp @@ -43,4 +43,6 @@ int main (int argc, char *argv []) ACE_RE_THROW; } ACE_ENDTRY; + + return 0; } diff --git a/TAO/orbsvcs/tests/Time/Client_i.cpp b/TAO/orbsvcs/tests/Time/Client_i.cpp index a2b38e041a0..bc2517acc91 100644 --- a/TAO/orbsvcs/tests/Time/Client_i.cpp +++ b/TAO/orbsvcs/tests/Time/Client_i.cpp @@ -26,13 +26,13 @@ void Client_i::test_for_secure_universal_time (void) { ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing secure_time()\n")); + "[CLIENT] Process/Thread Id : (%P/%t) Testing secure_time()\n")); ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { CosTime::UTO_var UTO_server = - this->clerk_->secure_universal_time (ACE_TRY_ENV); + this->clerk_->secure_universal_time (ACE_TRY_ENV); ACE_TRY_CHECK; } @@ -40,8 +40,8 @@ Client_i::test_for_secure_universal_time (void) { ACE_PRINT_EXCEPTION (sysex, "System Exception"); ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) test_for_secure_universal_time() successful !!\n")); - } + "[CLIENT] Process/Thread Id : (%P/%t) test_for_secure_universal_time() successful !!\n")); + } ACE_ENDTRY; } @@ -52,24 +52,38 @@ void Client_i::test_for_universal_time (void) { ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing universal_time()\n")); + "[CLIENT] Process/Thread Id : (%P/%t) Testing universal_time()\n")); ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { CosTime::UTO_var UTO_server = - this->clerk_->universal_time (ACE_TRY_ENV); + this->clerk_->universal_time (ACE_TRY_ENV); ACE_TRY_CHECK; + +#ifndef ACE_LACKS_LONGLONG_T + ACE_DEBUG ((LM_DEBUG, + "\nTime = %Q\nInaccuracy = %Q\nTimeDiff = %d\nstruct.time = %Q" + "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", + UTO_server->time (ACE_TRY_ENV), + UTO_server->inaccuracy (ACE_TRY_ENV), + UTO_server->tdf (ACE_TRY_ENV), + (UTO_server->utc_time ()).time, + (UTO_server->utc_time ()).inacclo, + (UTO_server->utc_time ()).inacchi, + (UTO_server->utc_time ()).tdf)); +#else ACE_DEBUG ((LM_DEBUG, - "\nTime = %Q\nInaccuracy = %Q\nTimeDiff = %d\nstruct.time = %Q" - "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", - UTO_server->time (ACE_TRY_ENV), - UTO_server->inaccuracy (ACE_TRY_ENV), - UTO_server->tdf (ACE_TRY_ENV), - (UTO_server->utc_time ()).time, - (UTO_server->utc_time ()).inacclo, - (UTO_server->utc_time ()).inacchi, - (UTO_server->utc_time ()).tdf)); + "\nTime = %u\nInaccuracy = %u\nTimeDiff = %d\nstruct.time = %u" + "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", + UTO_server->time (ACE_TRY_ENV).lo(), + UTO_server->inaccuracy (ACE_TRY_ENV).lo(), + UTO_server->tdf (ACE_TRY_ENV), + (UTO_server->utc_time ()).time.lo(), + (UTO_server->utc_time ()).inacclo, + (UTO_server->utc_time ()).inacchi, + (UTO_server->utc_time ()).tdf)); +#endif ACE_TRY_CHECK; } @@ -88,7 +102,7 @@ Client_i::test_for_new_universal_time (void) TimeBase::TimeT time = 999999999; TimeBase::InaccuracyT inaccuracy = 9999; TimeBase::TdfT tdf = 99; - + ACE_DEBUG ((LM_DEBUG, "[CLIENT] Process/Thread Id : (%P/%t) Testing new_universal_time()\n")); @@ -96,7 +110,7 @@ Client_i::test_for_new_universal_time (void) ACE_TRY { CosTime::UTO_var UTO_server = this->clerk_->new_universal_time (time, - inaccuracy, + inaccuracy, tdf, ACE_TRY_ENV); @@ -107,7 +121,7 @@ Client_i::test_for_new_universal_time (void) ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).inacchi == 0); ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).inacclo == 9999); ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).tdf == 99); - + ACE_TRY_CHECK; } ACE_CATCHANY @@ -137,11 +151,11 @@ Client_i::test_for_uto_from_utc (void) { CosTime::UTO_var UTO_server = this->clerk_->uto_from_utc (utc_struct, ACE_TRY_ENV); - + TimeBase::InaccuracyT inaccuracy = utc_struct.inacchi; inaccuracy <<= 32; inaccuracy |= utc_struct.inacclo; - + ACE_ASSERT (UTO_server->time (ACE_TRY_ENV) == 999999999); ACE_ASSERT (UTO_server->inaccuracy (ACE_TRY_ENV) == inaccuracy); ACE_ASSERT (UTO_server->tdf (ACE_TRY_ENV) == 99); @@ -149,7 +163,7 @@ Client_i::test_for_uto_from_utc (void) ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).inacclo == 50); ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).inacchi == 50); ACE_ASSERT ((UTO_server->utc_time (ACE_TRY_ENV)).tdf == 99); - + ACE_TRY_CHECK; } ACE_CATCHANY @@ -174,7 +188,7 @@ Client_i::test_for_new_interval (void) ACE_TRY { CosTime::TIO_var TIO_server = this->clerk_->new_interval (lower, - upper, + upper, ACE_TRY_ENV); ACE_ASSERT ((TIO_server->time_interval (ACE_TRY_ENV)).lower_bound == 666666666); @@ -189,7 +203,7 @@ Client_i::test_for_new_interval (void) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception :\n"); } ACE_ENDTRY; - + return; } @@ -234,14 +248,14 @@ Client_i::parse_args (void) while ((c = get_opts ()) != -1) // ACE_DEBUG((LM_DEBUG,"bal =1%c",c - // )); + // )); switch (c) { case 'd': // debug flag TAO_debug_level++; break; case 'n': // loop count - this->loop_count_ = (u_int) ACE_OS::atoi (get_opts.optarg); + this->loop_count_ = (u_int) ACE_OS::atoi (get_opts.optarg); break; case 'k': // ior provide on command line this->ior_ = ACE_OS::strdup (get_opts.optarg); @@ -259,16 +273,16 @@ Client_i::parse_args (void) break; case '?': default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s" " [-d]" - " [-n loopcount]" - " [-f ior-file]" + " [-n loopcount]" + " [-f ior-file]" " [-k ior]" - " [-x]" + " [-x]" "\n", - this->argv_ [0]), - -1); + this->argv_ [0]), + -1); } // Indicates successful parsing of command line. @@ -314,13 +328,13 @@ Client_i::obtain_initial_references (void) { // Initialize the naming services. if (my_name_client_.init (orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + "[CLIENT] Process/Thread Id : (%P/%t) Unable to initialize " + "the TAO_Naming_Client. \n"), + -1); ACE_DEBUG ((LM_DEBUG, - "DONE\n")); + "DONE\n")); char host_name[MAXHOSTNAMELEN]; char name[MAXHOSTNAMELEN]; @@ -335,23 +349,23 @@ Client_i::obtain_initial_references (void) clerk_name[1].id = CORBA::string_dup (name); ACE_DEBUG ((LM_DEBUG, - "%s|\n", - name)); + "%s|\n", + name)); CORBA::Object_var temp_object = my_name_client_->resolve (clerk_name, - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_TRY_CHECK; clerk_ = CosTime::TimeService::_narrow (temp_object.in (), - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_TRY_CHECK; if (CORBA::is_nil (clerk_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to Resolve " - "Clerk Reference\n"), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + "[CLIENT] Process/Thread Id : (%P/%t) Unable to Resolve " + "Clerk Reference\n"), + -1); } ACE_CATCHANY { @@ -371,7 +385,7 @@ Client_i::init (int argc, char **argv) { this->argc_ = argc; this->argv_ = argv; - + ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY @@ -388,38 +402,38 @@ Client_i::init (int argc, char **argv) return -1; if (this->ior_) - { - // An ior is specified for the client through a commandline - // option or a file. - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid ior <%s>\n", - this->ior_), - -1); - this->clerk_ = - CosTime::TimeService::_narrow (server_object.in (), + { + // An ior is specified for the client through a commandline + // option or a file. + + CORBA::Object_var server_object = + this->orb_->string_to_object (this->ior_, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (CORBA::is_nil (server_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + "invalid ior <%s>\n", + this->ior_), + -1); + this->clerk_ = + CosTime::TimeService::_narrow (server_object.in (), ACE_TRY_ENV); - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Using the IOR provided\n")); - ACE_TRY_CHECK; - } + ACE_DEBUG ((LM_DEBUG, + "[CLIENT] Process/Thread Id : (%P/%t) Using the IOR provided\n")); + ACE_TRY_CHECK; + } else - { // No IOR specified. Use the Naming Service - ACE_DEBUG((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Using the Naming Service\n")); + { // No IOR specified. Use the Naming Service + ACE_DEBUG((LM_DEBUG, + "[CLIENT] Process/Thread Id : (%P/%t) Using the Naming Service\n")); - if (this->obtain_initial_references () == -1) - return -1; + if (this->obtain_initial_references () == -1) + return -1; - ACE_TRY_CHECK; - } + ACE_TRY_CHECK; + } } ACE_CATCHANY { |