summaryrefslogtreecommitdiff
path: root/netsvcs/servers/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netsvcs/servers/main.cpp')
-rw-r--r--netsvcs/servers/main.cpp53
1 files changed, 15 insertions, 38 deletions
diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp
index dd21ed1cf58..d8ea477d343 100644
--- a/netsvcs/servers/main.cpp
+++ b/netsvcs/servers/main.cpp
@@ -23,26 +23,20 @@ main (int argc, char *argv[])
// Register ourselves to receive signals so we can shut down
// gracefully.
- if (ACE_Reactor::instance ()->register_handler (sig_set,
- &sa) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n"),
- -1);
+ if (ACE_Reactor::instance ()->register_handler (sig_set, &sa) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n"), -1);
// Try to link in the svc.conf entries dynamically.
if (ACE_Service_Config::open (argc, argv) == -1)
{
if (errno != ENOENT)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "open"),
- 1);
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1);
else // Use static linking.
{
char *l_argv[3];
// Calling ACE_SVC_INVOKE to create a new Service_Object.
- // Stash the newly created Service_Object into an
+ // Stash the newly created Service_Object into an
// ACE_Service_Object_Ptr which is an <auto_ptr> specialized
// for ACE_Service_Object.
@@ -51,19 +45,14 @@ main (int argc, char *argv[])
ACE_Service_Object_Ptr sp_1 = ACE_SVC_INVOKE (ACE_Name_Acceptor);
if (sp_1->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Name Service",
- 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Name Service", 1));
l_argv[0] = "-p " ACE_DEFAULT_TIME_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_2 = ACE_SVC_INVOKE (ACE_TS_Server_Acceptor);
if (sp_2->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "TS Server Acceptor", 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "TS Server Acceptor", 1));
l_argv[0] = argv[0];
l_argv[1] = "-p 10011";
@@ -78,53 +67,41 @@ main (int argc, char *argv[])
ACE_Service_Object_Ptr sp_4 = ACE_SVC_INVOKE (ACE_Token_Acceptor);
if (sp_4->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Token Service",
- 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Token Service", 1));
l_argv[0] = "-p " ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_5 = ACE_SVC_INVOKE (ACE_Thr_Server_Logging_Acceptor);
if (sp_5->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Threaded Logging Server",
- 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Threaded Logging Server", 1));
l_argv[0] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_6 = ACE_SVC_INVOKE (ACE_Server_Logging_Acceptor);
if (sp_6->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Logging Server", 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Server", 1));
l_argv[0] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_7 = ACE_SVC_INVOKE (ACE_Client_Logging_Acceptor);
if (sp_7->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Logging Client",
- 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Client", 1));
- // Run forever, performing the configured services until we
- // are shut down by a SIGINT/SIGQUIT signal.
+ // Run forever, performing the configured services until we are shut
+ // down by a SIGINT/SIGQUIT signal.
ACE_Reactor::run_event_loop ();
- // Destructors of ACE_Service_Object_Ptr's automagically
- // call fini().
+ // Destructors of ACE_Service_Object_Ptr's automagically call fini().
}
}
else // Use dynamic linking.
- // Run forever, performing the configured services until we are
- // shut down by a SIGINT/SIGQUIT signal.
+ // Run forever, performing the configured services until we are shut
+ // down by a SIGINT/SIGQUIT signal.
ACE_Reactor::run_event_loop ();