summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/LoadBalancing/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/LoadBalancing/server.cpp')
-rw-r--r--TAO/orbsvcs/examples/LoadBalancing/server.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/TAO/orbsvcs/examples/LoadBalancing/server.cpp b/TAO/orbsvcs/examples/LoadBalancing/server.cpp
index 66d41596ce8..591da3c57c0 100644
--- a/TAO/orbsvcs/examples/LoadBalancing/server.cpp
+++ b/TAO/orbsvcs/examples/LoadBalancing/server.cpp
@@ -3,6 +3,7 @@
#include "ORBInitializer.h"
#include "RPS_Monitor.h"
#include "ace/OS.h"
+#include "ace/Argv_Type_Converter.h"
#include "ace/Get_Opt.h"
@@ -21,7 +22,7 @@ int number;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:n:s:r:c:d:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:n:s:r:c:d:");
int c;
while ((c = get_opts ()) != -1)
@@ -238,8 +239,10 @@ join_object_group (CORBA::ORB_ptr orb,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
ORBInitializer *initializer = 0;
@@ -254,7 +257,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -277,7 +280,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -328,7 +331,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
// If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",