summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-28 19:16:54 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-28 19:16:54 +0000
commit0f52176a26aa682db5fa0d1102a8b7a1089ebc19 (patch)
treefddc1f3580926c132a42b815f37648c3b7fd982b /examples
parent35694b240f65263ad801d18f0e04daceb7a44418 (diff)
downloadATCD-0f52176a26aa682db5fa0d1102a8b7a1089ebc19.tar.gz
Made CE friendly. Add "-y" flag to Service_Config.
Diffstat (limited to 'examples')
-rw-r--r--examples/Service_Configurator/Misc/main.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/examples/Service_Configurator/Misc/main.cpp b/examples/Service_Configurator/Misc/main.cpp
index df1a99a2575..d505c346a0f 100644
--- a/examples/Service_Configurator/Misc/main.cpp
+++ b/examples/Service_Configurator/Misc/main.cpp
@@ -29,24 +29,26 @@ ACE_RCSID(Misc, main, "$Id$")
ACE_STATIC_SVC_REQUIRE (Timer_Service_1)
int
-main (int, char *argv[])
+main (int, ASYS_TCHAR *argv[])
{
- char *l_argv[6];
+ ASYS_TCHAR *l_argv[7];
// Manufacture a "fake" svc.conf entry to demonstrate the -S option
// that allows us to pass these entries via the "command-line"
// rather than the svc.conf file.
l_argv[0] = argv[0];
- l_argv[1] = "-S";
- l_argv[2] = "static Timer_Service_1 \"timer 1 10 $TRACE\"";
- l_argv[3] = "-S";
- l_argv[4] = "dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() \"timer 2 10 $TRACE\"";
- l_argv[5] = 0;
-
- if (ACE_Service_Config::open (5, l_argv) == -1 && errno != ENOENT)
+ l_argv[1] = ASYS_TEXT ("-y");
+ l_argv[2] = ASYS_TEXT ("-S");
+ l_argv[3] = ASYS_TEXT ("static Timer_Service_1 \"timer 1 10 $TRACE\"");
+ l_argv[4] = ASYS_TEXT ("-S");
+ l_argv[5] = ASYS_TEXT ("dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() \"timer 2 10 $TRACE\"");
+ l_argv[6] = 0;
+ l_argv[3] = 0;
+
+ if (ACE_Service_Config::open (6, l_argv) == -1 && errno != ENOENT)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "open"),
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("open")),
1);
// Run forever, performing the configured services until we