summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97b3
-rw-r--r--ace/Connector.cpp29
-rw-r--r--ace/Connector.h24
-rw-r--r--ace/Log_Msg.cpp26
-rw-r--r--ace/OS.h14
-rw-r--r--ace/README1
-rw-r--r--ace/config-win32-common.h1
-rw-r--r--netsvcs/lib/Client_Logging_Handler.cpp147
-rw-r--r--netsvcs/lib/Client_Logging_Handler.h20
-rw-r--r--netsvcs/servers/main.cpp30
-rw-r--r--netsvcs/servers/svc.conf12
11 files changed, 219 insertions, 88 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 9d2c2696f3a..9f0c189bc9c 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,5 +1,8 @@
Tue Sep 16 11:42:32 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+ * ace: Added a new flag called ACE_LACKS_FIFO to distinguish the
+ (lack of) features on Win32...
+
* ace/Timer_Queue_T: Added an expire() wrapper for the
Async_Timer_Queue_Adapter.
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index 983dc54bbe5..cc583f0cc69 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -356,9 +356,13 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh,
timeout = (ACE_Time_Value *) synch_options.time_value ();
// Delegate to connection strategy.
- if (this->connect_svc_handler (sh, remote_addr, timeout,
- local_addr, reuse_addr,
- flags, perms) == -1)
+ if (this->connect_svc_handler (sh,
+ remote_addr,
+ timeout,
+ local_addr,
+ reuse_addr,
+ flags,
+ perms) == -1)
{
if (use_reactor && errno == EWOULDBLOCK)
{
@@ -390,6 +394,25 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh,
return this->activate_svc_handler (sh);
}
+// Initiate connection to peer.
+
+template <class SH, PR_CO_1> int
+ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
+ SH *sh[],
+ PR_AD remote_addrs[],
+ const ACE_Synch_Options &synch_options)
+{
+ size_t i;
+
+ for (i = 0; i < n; i++)
+ if (this->connect (sh[i], remote_addrs[i], synch_options) == -1
+ && !(synch_options[ACE_Synch_Options::USE_REACTOR]
+ && errno == EWOULDBLOCK))
+ return -1;
+
+ return i;
+}
+
// Cancel a <svc_handler> that was started asynchronously.
template <class SH, PR_CO_1> int
ACE_Connector<SH, PR_CO_2>::cancel (SH *sh)
diff --git a/ace/Connector.h b/ace/Connector.h
index f3af331b2a5..f620feaf08c 100644
--- a/ace/Connector.h
+++ b/ace/Connector.h
@@ -127,7 +127,7 @@ public:
virtual ~ACE_Connector (void);
// Shutdown a connector and release resources.
- // = Connection establishment method
+ // = Connection establishment methods.
virtual int connect (SVC_HANDLER *&svc_handler,
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
@@ -137,13 +137,21 @@ public:
int reuse_addr = 0,
int flags = O_RDWR,
int perms = 0);
- // Initiate connection to <peer> at <remote_addr> using
- // <synch_options>. If the caller wants to designate the selected
- // <local_addr> they can (and can also insist that the <local_addr>
- // be reused by passing a value <reuse_addr> == 1). <flags> and
- // <perms> can be used to pass any flags that are needed to perform
- // specific operations such as opening a file within connect with
- // certain permissions.
+ // Initiate connection of <svc_handler> to peer at <remote_addr>
+ // using <synch_options>. If the caller wants to designate the
+ // selected <local_addr> they can (and can also insist that the
+ // <local_addr> be reused by passing a value <reuse_addr> ==
+ // 1). <flags> and <perms> can be used to pass any flags that are
+ // needed to perform specific operations such as opening a file
+ // within connect with certain permissions.
+
+ virtual int connect_n (size_t n,
+ SVC_HANDLER *svc_handlers[],
+ ACE_PEER_CONNECTOR_ADDR remote_addrs[],
+ const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults);
+ // Initiate connection of <n> <svc_handlers> to peers at
+ // <remote_addrs> using <synch_options>. Returns -1 if failure
+ // occurs, otherwise returns the number of handlers connected.
virtual int cancel (SVC_HANDLER *svc_handler);
// Cancel a <svc_handler> that was started asynchronously. Note that
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 81cc4d3d533..2c9c97390f2 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -38,13 +38,15 @@
// IPC conduit between sender and client daemon. This should be
// included in the <ACE_Log_Msg> class, but due to "order of include"
// problems it can't be...
-#if defined (ACE_WIN32)
-# include "ace/SPIPE_Connector.h"
- static ACE_SPIPE_Stream *ACE_Log_Msg_message_queue = 0;
+#if defined (ACE_LACKS_FIFO)
+# include "ace/SOCK_Connector.h"
+typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC;
#else
# include "ace/FIFO_Send_Msg.h"
- static ACE_FIFO_Send_Msg *ACE_Log_Msg_message_queue = 0;
-#endif /* ACE_WIN32 */
+typedef ACE_FIFO_Send_Msg ACE_LOG_MSG_IPC;
+#endif /* ACE_LACKS_FIFO */
+
+static ACE_LOG_MSG_IPC *ACE_Log_Msg_message_queue = 0;
#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
# include /**/ <iostream.h>
@@ -101,12 +103,8 @@ ACE_Log_Msg_Manager::get_lock (void)
ACE_NEW_RETURN_I (ACE_Log_Msg_Manager::lock_, ACE_Thread_Mutex, 0);
- // Allocated the static message queue instance.
-# if defined (ACE_WIN32)
- ACE_NEW_RETURN (ACE_Log_Msg_message_queue, ACE_SPIPE_Stream, 0);
-# else
- ACE_NEW_RETURN (ACE_Log_Msg_message_queue, ACE_FIFO_Send_Msg, 0);
-#endif /* ACE_WIN32 */
+ // Allocated the ACE_Log_Msg IPC instance.
+ ACE_NEW_RETURN (ACE_Log_Msg_message_queue, ACE_LOG_MSG_IPC, 0);
}
return ACE_Log_Msg_Manager::lock_;
@@ -461,13 +459,13 @@ ACE_Log_Msg::open (const char *prog_name,
if (logger_key == 0)
status = -1;
else
-#if defined (ACE_WIN32)
+#if defined (ACE_LACKS_FIFO)
{
if (ACE_Log_Msg_message_queue->get_handle () != ACE_INVALID_HANDLE)
ACE_Log_Msg_message_queue->close ();
- ACE_SPIPE_Connector con;
+ ACE_SOCK_Connector con;
status = con.connect (*ACE_Log_Msg_message_queue,
- ACE_SPIPE_Addr (logger_key));
+ ACE_INET_Addr (logger_key));
}
#else
if (ACE_Log_Msg_message_queue->get_handle () != ACE_INVALID_HANDLE)
diff --git a/ace/OS.h b/ace/OS.h
index 0e956a2853e..74738152bbe 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -159,6 +159,15 @@
#define ACE_DEFAULT_TIME_SERVER_STR "ACE_TS_TIME"
#endif /* ACE_DEFAULT_TIME_SERVER_STR */
+// Used by the FIFO tests and the Client_Logging_Handler netsvc.
+#if !defined (ACE_DEFAULT_RENDEZVOUS)
+#if defined (ACE_LACKS_FIFO)
+#define ACE_DEFAULT_RENDEZVOUS "localhost:10012"
+#else
+#define ACE_DEFAULT_RENDEZVOUS "/tmp/fifo.ace"
+#endif /* ACE_LACKS_FIFO */
+#endif /* ACE_DEFAULT_RENDEZVOUS */
+
#if !defined (ACE_DEFAULT_SERVER_HOST)
#define ACE_DEFAULT_SERVER_HOST "localhost"
#endif /* ACE_DEFAULT_SERVER_HOST */
@@ -179,11 +188,6 @@
#define ACE_DEFAULT_MAX_SEGMENTS 6
#endif /* ACE_DEFAULT_MAX_SEGMENTS */
-// Used by the FIFO tests.
-#if !defined (ACE_DEFAULT_RENDEZVOUS)
-#define ACE_DEFAULT_RENDEZVOUS "/tmp/fifo.ace"
-#endif /* ACE_DEFAULT_RENDEZVOUS */
-
// Name of the map that's stored in shared memory.
#if !defined (ACE_NAME_SERVER_MAP)
#define ACE_NAME_SERVER_MAP "Name Server Map"
diff --git a/ace/README b/ace/README
index c171b5109fd..9cf944aabc7 100644
--- a/ace/README
+++ b/ace/README
@@ -115,6 +115,7 @@ ACE_HAS_PTHREAD_T Platform has pthread_t defined.
ACE_HAS_PTHREAD_YIELD_VOIDPTR pthread_yield() takes a void pointer arg.
ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse infinitely on thread exits from TSS cleanup routines (e.g., AIX).
ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant functions (i.e., all the POSIX *_r functions).
+ACE_LACKS_FIFO Platform lacks UNIX FIFOs (e.g., Win32)
ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support reentrant netdb functions (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r, gethostbyname_r, getservbyname_r).
ACE_HAS_REGEX Platform supports the POSIX regular expression library
ACE_HAS_SELECT_H Platform has special header for select().
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index 31b86053950..5e70323e4a5 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -23,6 +23,7 @@
#define ACE_LACKS_SEMBUF_T
#define ACE_LACKS_MSGBUF_T
#define ACE_LACKS_SYSV_SHMEM
+#define ACE_LACKS_FIFO
// Only MSVC 5.0 definitions
#if (_MSC_VER >= 1100)
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp
index 0135eb3a96d..64b61c5c758 100644
--- a/netsvcs/lib/Client_Logging_Handler.cpp
+++ b/netsvcs/lib/Client_Logging_Handler.cpp
@@ -6,27 +6,49 @@
#include "ace/Get_Opt.h"
#include "Client_Logging_Handler.h"
+#if defined (ACE_LACKS_FIFO)
+#define DEFAULT_RENDEZVOUS "10012"
+#else
+#define DEFAULT_RENDEZVOUS ACE_DEFAULT_RENDEZVOUS
+#endif /* ACE_LACKS_FIFO */
+
ACE_Client_Logging_Handler::ACE_Client_Logging_Handler (const char rendezvous[])
: logging_output_ (ACE_STDOUT)
{
+#if defined (ACE_LACKS_FIFO)
+ if (this->acceptor_.open (ACE_INET_Addr (DEFAULT_RENDEZVOUS)) == -1)
+ ACE_ERROR ((LM_ERROR, "%p\n", "open"));
+ // Register passive-mode socket to receive connections from clients.
+ else if (ACE_Reactor::instance ()->register_handler
+ (this->acceptor_.get_handle (),
+ this,
+ ACE_Event_Handler::ACCEPT_MASK) == -1)
+ ACE_ERROR ((LM_ERROR, "%n: %p\n", "register_handler"));
+ ACE_DEBUG ((LM_DEBUG,
+ "opened acceptor socket at %s on handle %d\n",
+ rendezvous,
+ this->acceptor_.get_handle ()));
+#else
if (ACE_OS::unlink (rendezvous) == -1 && errno == EACCES)
ACE_ERROR ((LM_ERROR, "%p\n", "unlink"));
- else if (this->message_fifo_.open (rendezvous) == -1)
+ else if (this->msg_queue_.open (rendezvous) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "open"));
// Register message FIFO to receive input from clients. Note that
// we need to put the EXCEPT_MASK here to deal with SVR4 MSG_BAND
// data correctly...
else if (ACE_Reactor::instance ()->register_handler
- (this->message_fifo_.get_handle (), this,
+ (this->msg_queue_.get_handle (),
+ this,
ACE_Event_Handler::READ_MASK | ACE_Event_Handler::EXCEPT_MASK) == -1)
ACE_ERROR ((LM_ERROR, "%n: %p\n",
- "register_handler (message_fifo)"));
+ "register_handler"));
ACE_DEBUG ((LM_DEBUG,
"opened fifo at %s on handle %d\n",
rendezvous,
- this->message_fifo_.get_handle ()));
+ this->msg_queue_.get_handle ()));
+#endif /* ACE_LACKS_FIFO */
}
// This is called when a <send> to the logging server fails...
@@ -47,11 +69,11 @@ ACE_Client_Logging_Handler::open (void *)
// Register ourselves to receive SIGPIPE so we can attempt
// reconnections.
-#if !defined (ACE_WIN32)
+#if !defined (ACE_LACKS_FIFO)
if (ACE_Reactor::instance ()->register_handler (SIGPIPE, this) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n",
"register_handler (SIGPIPE)"), -1);
-#endif /* ACE_WIN32 */
+#endif /* !ACE_LACKS_FIFO */
// Figure out what remote port we're really bound to.
if (this->peer ().get_remote_addr (server_addr) == -1)
@@ -69,7 +91,13 @@ ACE_Client_Logging_Handler::open (void *)
ACE_Client_Logging_Handler::get_handle (void) const
{
ACE_TRACE ("ACE_Client_Logging_Handler::get_handle");
- return this->message_fifo_.get_handle ();
+#if defined (ACE_LACKS_FIFO)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "get_handle() shouldn't be called\n"),
+ ACE_INVALID_HANDLE);
+#else
+ return this->msg_queue_.get_handle ();
+#endif /* ACE_LACKS_FIFO */
}
// Receive a logging record from an application.
@@ -77,31 +105,62 @@ ACE_Client_Logging_Handler::get_handle (void) const
int
ACE_Client_Logging_Handler::handle_input (ACE_HANDLE handle)
{
- if (handle == this->message_fifo_.get_handle ())
+ if (handle == this->peer ().get_handle ())
+ // We're getting a message from the logging server!
+ ACE_ERROR_RETURN ((LM_ERROR, "received data from server!\n"), -1);
+#if defined (ACE_LACKS_FIFO)
+ else if (handle == this->acceptor_.get_handle ())
{
- // We're getting a logging message from a local application.
-
- ACE_Log_Record log_record;
- ACE_Str_Buf msg ((void *) &log_record,
- 0, sizeof log_record);
-
- ACE_DEBUG ((LM_DEBUG, "in handle_input\n"));
- if (this->message_fifo_.recv (msg) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_FIFO_Recv_Msg::recv"), -1);
- else if (this->send (log_record) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 0);
+ ACE_SOCK_Stream msg_queue;
+
+ if (this->acceptor_.accept (msg_queue) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), -1);
+
+ // Register message socket to receive input from clients.
+ else if (ACE_Reactor::instance ()->register_handler
+ (msg_queue_.get_handle (),
+ this,
+ ACE_Event_Handler::READ_MASK) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n",
+ "register_handler"), -1);
return 0;
}
- else if (handle == this->peer ().get_handle ())
- {
- // We're getting a message from the logging server!
- ACE_ASSERT (!"this shouldn't happen yet...\n");
- }
+
+ // For the duration of this call store the socket into the FIFO so
+ // that we can use the ol' 2-read trick... Note that this assumes
+ // we aren't using STREAM pipes (if we were, we wouldn't need to use
+ // sockets!).
+ this->msg_queue_.set_handle (handle);
+
+#endif /* ACE_LACKS_FIFO */
+ {
+ // We're getting a logging message from a local application.
+
+ ACE_Log_Record log_record;
+ ACE_Str_Buf msg ((void *) &log_record,
+ 0,
+ sizeof log_record);
+
+ ACE_DEBUG ((LM_DEBUG, "in handle_input\n"));
+
+ if (this->msg_queue_.recv (msg) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "ACE_FIFO_Recv_Msg::recv"),
+ -1);
+ else if (this->send (log_record) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "send"),
+ 0);
+ return 0;
+ }
+
return 0;
}
-// Receive a logging record from an application send via a non-0 MSG_BAND...
-// This just calls handle_input().
+// Receive a logging record from an application send via a non-0
+// MSG_BAND... This just calls handle_input().
int
ACE_Client_Logging_Handler::handle_exception (ACE_HANDLE handle)
@@ -116,13 +175,23 @@ ACE_Client_Logging_Handler::close (u_long)
{
ACE_DEBUG ((LM_DEBUG, "shutting down!!!\n"));
+#if defined (ACE_LACKS_FIFO)
+ if (ACE_Reactor::instance ()->remove_handler
+ (this->acceptor_.get_handle (),
+ ACE_Event_Handler::ACCEPT_MASK) == -1)
+ ACE_ERROR ((LM_ERROR, "%n: %p\n",
+ "remove_handler"));
+#else
if (ACE_Reactor::instance ()->remove_handler
- (this->message_fifo_.get_handle (),
- ACE_Event_Handler::READ_MASK | ACE_Event_Handler::EXCEPT_MASK | ACE_Event_Handler::DONT_CALL) == -1)
+ (this->msg_queue_.get_handle (),
+ ACE_Event_Handler::READ_MASK
+ | ACE_Event_Handler::EXCEPT_MASK
+ | ACE_Event_Handler::DONT_CALL) == -1)
ACE_ERROR ((LM_ERROR, "%n: %p\n",
- "remove_handler (message_fifo)"));
+ "remove_handler"));
+#endif /* ACE_LACKS_FIFO */
- this->message_fifo_.close ();
+ this->msg_queue_.close ();
this->destroy ();
return 0;
}
@@ -150,10 +219,10 @@ ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
if (this->peer ().send (4, &encoded_len, sizeof encoded_len,
(char *) &log_record, len) == -1)
- // Switch over to logging to stdout for now. In the long
- // run, we'll need to queue up the message, try to
- // reestablish a connection, and then send the queued data
- // once we've reconnect to the logging server.
+ // Switch over to logging to stdout for now. In the long run,
+ // we'll need to queue up the message, try to reestablish a
+ // connection, and then send the queued data once we've
+ // reconnect to the logging server.
this->logging_output_ = ACE_STDOUT;
}
@@ -162,6 +231,10 @@ ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
class ACE_Client_Logging_Connector : public ACE_Connector<ACE_Client_Logging_Handler, ACE_SOCK_CONNECTOR>
// = TITLE
+ // This factory creates connections with the
+ // <Server_Logging_Acceptor>.
+ //
+ // = DESCRIPTION
// This class contains the service-specific methods that can't
// easily be factored into the <ACE_Connector>.
{
@@ -195,8 +268,8 @@ private:
// Address of the logging server.
const char *rendezvous_key_;
- // Filename where the FIFO will listen for application logging
- // records.
+ // Communication endpoint where the client logging daemon will
+ // listen for application logging records.
ACE_Client_Logging_Handler *handler_;
// Pointer to the handler that does the work.
@@ -254,7 +327,7 @@ ACE_Client_Logging_Connector::init (int argc, char *argv[])
int
ACE_Client_Logging_Connector::parse_args (int argc, char *argv[])
{
- this->rendezvous_key_ = ACE_DEFAULT_RENDEZVOUS;
+ this->rendezvous_key_ = DEFAULT_RENDEZVOUS;
this->server_port_ = ACE_DEFAULT_LOGGING_SERVER_PORT;
this->server_host_ = ACE_DEFAULT_SERVER_HOST;
diff --git a/netsvcs/lib/Client_Logging_Handler.h b/netsvcs/lib/Client_Logging_Handler.h
index 6deeed2100f..7de14e72783 100644
--- a/netsvcs/lib/Client_Logging_Handler.h
+++ b/netsvcs/lib/Client_Logging_Handler.h
@@ -18,6 +18,7 @@
#define ACE_CLIENT_LOGGER_H
#include "ace/Connector.h"
+#include "ace/SOCK_Acceptor.h"
#include "ace/SOCK_Connector.h"
#include "ace/FIFO_Recv_Msg.h"
@@ -26,12 +27,20 @@ class ACE_Svc_Export ACE_Client_Logging_Handler : public ACE_Svc_Handler<ACE_SOC
// This client logging daemon is a mediator that receives logging
// records from local applications processes and forwards them to
// the server logging daemon running on another host.
+ //
+ // = DESCRIPTION
+ // The default implementation uses an <ACE_FIFO_Recv_Msg> data
+ // member to receive the logging message from the application
+ // and an <ACE_SOCK_Stream> to forward the logging message to
+ // the server. However, on platforms that don't support FIFOs
+ // (e.g., Win32) we use sockets instead of FIFOs.
{
+friend class ACE_Client_Logging_Connector;
public:
// = Initialization and termination.
ACE_Client_Logging_Handler (const char rendezvous[] = 0);
- // Default constructor.
+ // Default constructor, which initializes the server endpoint.
virtual int open (void * = 0);
// Activate this instance of the <ACE_Client_Logging_Handler>
@@ -61,14 +70,17 @@ protected:
int send (ACE_Log_Record &log_record);
// Send the <log_record> to the logging server.
- ACE_FIFO_Recv_Msg message_fifo_;
+ ACE_FIFO_Recv_Msg msg_queue_;
// Message queue we use to receive logging records from clients.
-
+
ACE_HANDLE logging_output_;
// This is either a SOCKET (if we're connected to a logging server)
// or ACE_STDOUT.
- static void stderr_output (int = 0);
+#if defined (ACE_LACKS_FIFO)
+ ACE_SOCK_Acceptor acceptor_;
+ // Acceptor used for platforms that don't support FIFOs
+#endif /* ACE_LACKS_FIFO */
};
ACE_SVC_FACTORY_DECLARE (ACE_Client_Logging_Connector)
diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp
index 0f313da733d..af29e08863b 100644
--- a/netsvcs/servers/main.cpp
+++ b/netsvcs/servers/main.cpp
@@ -40,19 +40,20 @@ main (int argc, char *argv[])
{
char *l_argv[3];
+#if 0
l_argv[0] = "-p " ACE_DEFAULT_NAME_SERVER_PORT_STR;
l_argv[1] = 0;
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", "ACE_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";
@@ -60,28 +61,35 @@ main (int argc, char *argv[])
ACE_Service_Object_Ptr sp_3 = ACE_SVC_INVOKE (ACE_TS_Clerk_Processor);
if (sp_3->init (2, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "ACE_TS_Clerk_Processor", 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "TS Clerk Processor", 1));
l_argv[0] = "-p " ACE_DEFAULT_TOKEN_SERVER_PORT_STR;
l_argv[1] = 0;
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_LOGGING_SERVER_PORT_STR;
+ 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_Server_Logging_Acceptor);
+ 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", "Logging_Service", 1));
-
- l_argv[0] = "-p " ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Threaded Logging Server", 1));
+#endif
+ l_argv[0] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
- ACE_Service_Object_Ptr sp_6 = ACE_SVC_INVOKE (ACE_Thr_Server_Logging_Acceptor);
+ ACE_Service_Object_Ptr sp_6 = ACE_SVC_INVOKE (ACE_Client_Logging_Connector);
if (sp_6->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Thr_Logging_Service", 1));
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Client", 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_Server_Logging_Acceptor);
+
+ if (sp_7->init (1, l_argv) == -1)
+ ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Server", 1));
}
// Run forever, performing the configured services until we are shut
diff --git a/netsvcs/servers/svc.conf b/netsvcs/servers/svc.conf
index 1da53470fa8..e85cadf3138 100644
--- a/netsvcs/servers/svc.conf
+++ b/netsvcs/servers/svc.conf
@@ -8,10 +8,10 @@
# correctly.
dynamic Logger Service_Object * ../lib/netsvcs:_make_ACE_Logging_Strategy() "-s foobar -f STDERR|OSTREAM"
-dynamic Time_Service Service_Object * ../lib/netsvcs:_make_ACE_TS_Server_Acceptor() "-p 10222"
-dynamic Name_Server Service_Object * ../lib/netsvcs:_make_ACE_Name_Acceptor() "-p 10012"
-dynamic Token_Service Service_Object * ../lib/netsvcs:_make_ACE_Token_Acceptor() "-p 10202"
-dynamic Server_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Server_Logging_Acceptor() active "-p 10009"
-dynamic Thr_Server_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Thr_Server_Logging_Acceptor() active "-p 10020"
-dynamic Client_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Client_Logging_Connector() active "-p 10009"
+dynamic Time_Service Service_Object * ../lib/netsvcs:_make_ACE_TS_Server_Acceptor() "-p 20222"
+dynamic Name_Server Service_Object * ../lib/netsvcs:_make_ACE_Name_Acceptor() "-p 20012"
+dynamic Token_Service Service_Object * ../lib/netsvcs:_make_ACE_Token_Acceptor() "-p 20202"
+dynamic Server_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Server_Logging_Acceptor() active "-p 20009"
+dynamic Thr_Server_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Thr_Server_Logging_Acceptor() active "-p 20020"
+dynamic Client_Logging_Service Service_Object * ../lib/netsvcs:_make_ACE_Client_Logging_Connector() active "-p 20009"