summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2000-01-15 19:04:11 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2000-01-15 19:04:11 +0000
commitb11d520cd67c9e0c3f2169796592252307c45bd8 (patch)
treeb482a7f0f1514a1a508c548778ffdcc64b35bc3b /netsvcs
parentc0c905d14e4fbff28434b49ffce49c5a8ec88b4d (diff)
downloadATCD-b11d520cd67c9e0c3f2169796592252307c45bd8.tar.gz
ChangeLogTag:Sat Jan 15 00:41:12 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/clients/Naming/Client/main.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/netsvcs/clients/Naming/Client/main.cpp b/netsvcs/clients/Naming/Client/main.cpp
index 75918c46378..7ad3bf869b8 100644
--- a/netsvcs/clients/Naming/Client/main.cpp
+++ b/netsvcs/clients/Naming/Client/main.cpp
@@ -4,6 +4,7 @@
#include "ace/Service_Config.h"
#include "ace/Naming_Context.h"
+#include "ace/ARGV.h"
#include "Client_Test.h"
ACE_RCSID(Client, main, "$Id$")
@@ -22,14 +23,15 @@ main (int argc, char *argv[])
1));
else // Use static binding.
{
- char *l_argv[3];
- char port[] = "-p 10011";
- l_argv[0] = argv[0];
- l_argv[1] = port;
- l_argv[2] = 0;
- ACE_Service_Object *so = ACE_SVC_INVOKE (ACE_Naming_Context);
-
- if (so->init (2, l_argv) == -1)
+ ACE_ARGV args;
+
+ args.add (argv[0]);
+ args.add ("-p10011"); // Port number.
+ ACE_Service_Object *so =
+ ACE_SVC_INVOKE (ACE_Naming_Context);
+
+ if (so->init (args.argc (),
+ args.argv ()) == -1)
ACE_ERROR ((LM_ERROR,
"%p\n%a",
"ACE_Naming_Context",
@@ -37,7 +39,8 @@ main (int argc, char *argv[])
so = ACE_SVC_INVOKE (Client_Test);
- if (so->init (0, l_argv) == -1)
+ if (so->init (0,
+ args.argv ()) == -1)
ACE_ERROR ((LM_ERROR,
"%p\n%a",
"Client_Test",