diff options
Diffstat (limited to 'TAO/tests/NestedUpcall/MT_Client_Test')
7 files changed, 22 insertions, 13 deletions
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc index 35e6a89edfd..17842e4aca5 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc +++ b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc @@ -2,6 +2,7 @@ // $Id$ project(*Nested_Upcall_Server): taoserver, utils { + exename = server Source_Files { MT_Object_i.cpp server.cpp @@ -9,6 +10,7 @@ project(*Nested_Upcall_Server): taoserver, utils { } project(*Nested_Upcall_Client): taoexe, utils, portableserver { + exename = client after += *Nested_Upcall_Server Source_Files { MT_Object_i.cpp diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp index ba1c615cd55..59ba502b682 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp +++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp @@ -25,6 +25,7 @@ #include "ace/Read_Buffer.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_fcntl.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(MT_Client_Test, client, "$Id$") @@ -87,7 +88,7 @@ MT_Client::read_ior (char *filename) int MT_Client::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "df:g:h:i:n:s:"); + ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "df:g:h:i:n:s:"); int c; int result; @@ -285,15 +286,16 @@ MT_Client::init (int argc, char **argv, // This function runs the test. int -main (int argc, char **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { + ACE_Argv_Type_Converter convert (argc, argv); + ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { TAO_ORB_Manager orb_manager; - int r = orb_manager.init (argc, - argv + int r = orb_manager.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -308,15 +310,15 @@ main (int argc, char **argv) int threads = 1; for (i = 0; i < argc; i++) - if (ACE_OS::strcmp (argv[i], "-n") == 0) + if (ACE_OS::strcmp (argv[i], ACE_TEXT("-n")) == 0) threads = ACE_OS::atoi(argv[i + 1]); // create a separate server thread ACE_Thread_Manager server_thr_mgr; // starting the server thread MT_Server_Task *server = new MT_Server_Task (&server_thr_mgr, - argc, - argv, + convert.get_argc(), + convert.get_ASCII_argv(), &orb_manager); if (server->activate () != 0) { @@ -331,7 +333,7 @@ main (int argc, char **argv) MT_Client_Task **clients = new MT_Client_Task*[threads]; for (i = 0; i < threads; i++) - clients[i] = new MT_Client_Task (argc, argv, i); + clients[i] = new MT_Client_Task (convert.get_argc(), convert.get_ASCII_argv(), i); for (i = 0; i < threads; i++) if (clients[i]->activate () != 0) diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.h b/TAO/tests/NestedUpcall/MT_Client_Test/client.h index 0422ed8d7aa..482c71c2f2b 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/client.h +++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.h @@ -21,6 +21,7 @@ #define MT_CLIENT_H #include "ace/Get_Opt.h" +#include "ace/Argv_Type_Converter.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp index 36e81ffa7c3..078ced7852a 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp +++ b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp @@ -87,7 +87,7 @@ MT_Server::read_ior (char *filename) int MT_Server::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "d:f:g:h:i:n:s:"); + ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "d:f:g:h:i:n:s:"); int c; while ((c = get_opts ()) != -1) diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h index 01c4d33b760..588d3ba157f 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h +++ b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h @@ -30,6 +30,7 @@ #include "ace/Get_Opt.h" #include "ace/Task.h" #include "ace/Log_Msg.h" +#include "ace/Argv_Type_Converter.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_ORB_Manager; diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp index c3e0377bee6..3a8020259a5 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp +++ b/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp @@ -31,7 +31,7 @@ MT_Object_Server::MT_Object_Server (void) int MT_Object_Server::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "do:m"); + ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "do:m"); int c; while ((c = get_opts ()) != -1) @@ -41,7 +41,7 @@ MT_Object_Server::parse_args (void) TAO_debug_level++; break; case 'o': // output the IOR to a file. - this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w"); + this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w")); if (this->ior_output_file_ == 0) ACE_ERROR_RETURN ((LM_ERROR, "Unable to open %s for writing: %p\n", @@ -124,8 +124,10 @@ MT_Object_Server::~MT_Object_Server (void) } int -main (int argc, char *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); + MT_Object_Server MT_Object_Server; ACE_DEBUG ((LM_DEBUG, @@ -134,7 +136,7 @@ main (int argc, char *argv[]) ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - int r = MT_Object_Server.init (argc,argv ACE_ENV_ARG_PARAMETER); + int r = MT_Object_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (r == -1) diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.h b/TAO/tests/NestedUpcall/MT_Client_Test/server.h index 8d57cc0d23e..37d4369c2e4 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/server.h +++ b/TAO/tests/NestedUpcall/MT_Client_Test/server.h @@ -22,6 +22,7 @@ #define MT_CLIENT_TEST_MT_OBJECT_SERVER_H #include "ace/Get_Opt.h" +#include "ace/Argv_Type_Converter.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once |