diff options
Diffstat (limited to 'netsvcs')
-rw-r--r-- | netsvcs/clients/Naming/Client/Client_Test.h | 4 | ||||
-rw-r--r-- | netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h | 15 | ||||
-rw-r--r-- | netsvcs/lib/Base_Optimizer.h | 6 | ||||
-rw-r--r-- | netsvcs/lib/Client_Logging_Handler.h | 23 | ||||
-rw-r--r-- | netsvcs/lib/Log_Message_Receiver.h | 7 | ||||
-rw-r--r-- | netsvcs/lib/Logging_Strategy.h | 18 | ||||
-rw-r--r-- | netsvcs/lib/Name_Handler.h | 7 | ||||
-rw-r--r-- | netsvcs/lib/Server_Logging_Handler.h | 48 | ||||
-rw-r--r-- | netsvcs/lib/Server_Logging_Handler_T.h | 7 | ||||
-rw-r--r-- | netsvcs/lib/TS_Clerk_Handler.h | 43 | ||||
-rw-r--r-- | netsvcs/lib/TS_Server_Handler.h | 19 | ||||
-rw-r--r-- | netsvcs/lib/Token_Handler.h | 23 |
12 files changed, 136 insertions, 84 deletions
diff --git a/netsvcs/clients/Naming/Client/Client_Test.h b/netsvcs/clients/Naming/Client/Client_Test.h index 830db0e73c2..d0b3a1dba9d 100644 --- a/netsvcs/clients/Naming/Client/Client_Test.h +++ b/netsvcs/clients/Naming/Client/Client_Test.h @@ -4,6 +4,10 @@ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + // Define the external Client_Test interface. ACE_SVC_FACTORY_DECLARE (Client_Test) diff --git a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h index b1a82a50f3c..c2702ba04c9 100644 --- a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h +++ b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h @@ -2,6 +2,11 @@ // $Id$ #include "ace/Event_Handler.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Reactor.h" #include "ace/Naming_Context.h" @@ -10,8 +15,8 @@ class Dump_Restore : public ACE_Event_Handler public: enum Operation_Type { - BIND, - UNBIND, + BIND, + UNBIND, REBIND }; Dump_Restore (int argc, char *argv[]); @@ -47,9 +52,9 @@ private: int populate (Dump_Restore::Operation_Type op); int doit (Dump_Restore::Operation_Type op, - char *name, - char *value, - char *type = ""); + char *name, + char *value, + char *type = ""); int bind (char* key, char* value, char* type = ""); int unbind (char* key); int rebind (char* key, char* value, char* type = ""); diff --git a/netsvcs/lib/Base_Optimizer.h b/netsvcs/lib/Base_Optimizer.h index 86a174c0fce..48cb5059eb8 100644 --- a/netsvcs/lib/Base_Optimizer.h +++ b/netsvcs/lib/Base_Optimizer.h @@ -14,11 +14,15 @@ // // ============================================================================ -#if !defined (BASE_OPTIMIZER_H) +#ifndef BASE_OPTIMIZER_H #define BASE_OPTIMIZER_H #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + template<class Base, class Member> struct Base_Optimizer : public Base // = TITLE diff --git a/netsvcs/lib/Client_Logging_Handler.h b/netsvcs/lib/Client_Logging_Handler.h index a470ed4b649..efe2ef0ed33 100644 --- a/netsvcs/lib/Client_Logging_Handler.h +++ b/netsvcs/lib/Client_Logging_Handler.h @@ -5,19 +5,24 @@ // // = LIBRARY // ace -// +// // = FILENAME -// Client_Logging_Handler.h +// Client_Logging_Handler.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ -#if !defined (ACE_CLIENT_LOGGER_H) +#ifndef ACE_CLIENT_LOGGER_H #define ACE_CLIENT_LOGGER_H #include "ace/SPIPE_Stream.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Stream.h" #include "ace/Svc_Handler.h" #include "ace/Synch.h" @@ -36,7 +41,7 @@ class ACE_Svc_Export ACE_Client_Logging_Handler : public ACE_Svc_Handler<LOGGING // = TITLE // 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. + // the server logging daemon running on another host. // // = DESCRIPTION // The default implementation uses an <ACE_SPIPE_Stream> to @@ -63,8 +68,8 @@ public: private: virtual int handle_signal (int signum, - siginfo_t *, - ucontext_t *); + siginfo_t *, + ucontext_t *); // Handle SIGPIPE. virtual int handle_input (ACE_HANDLE); @@ -78,7 +83,7 @@ private: virtual int handle_output (ACE_HANDLE); // Called back when it's ok to send. - + int send (ACE_Log_Record &log_record); // Send the <log_record> to the logging server. diff --git a/netsvcs/lib/Log_Message_Receiver.h b/netsvcs/lib/Log_Message_Receiver.h index f67ad7fa084..8a182dd873f 100644 --- a/netsvcs/lib/Log_Message_Receiver.h +++ b/netsvcs/lib/Log_Message_Receiver.h @@ -14,10 +14,15 @@ // // ============================================================================ -#if !defined (LOG_MESSAGE_RECEIVER_H) +#ifndef LOG_MESSAGE_RECEIVER_H #define LOG_MESSAGE_RECEIVER_H #include "ace/Log_Record.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Synch.h" // ==========================================================================// diff --git a/netsvcs/lib/Logging_Strategy.h b/netsvcs/lib/Logging_Strategy.h index 06290131be5..0ac66225275 100644 --- a/netsvcs/lib/Logging_Strategy.h +++ b/netsvcs/lib/Logging_Strategy.h @@ -5,27 +5,31 @@ // // = LIBRARY // ace -// +// // = FILENAME // Logging_Strategy.h // // = AUTHOR -// Prashant Jain -// +// Prashant Jain +// // ============================================================================ -#if !defined (ACE_LOGGING_STRATEGY_H) +#ifndef ACE_LOGGING_STRATEGY_H #define ACE_LOGGING_STRATEGY_H #include "ace/Service_Object.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class ACE_Logging_Strategy : public ACE_Service_Object // = TITLE // This class provides the hooks to control the output produced - // by any of the network services. - // + // by any of the network services. + // // = DESCRIPTION - // Depending upon when this service is invoked and with what + // Depending upon when this service is invoked and with what // flags, the output of other network services can be // controlled. The output can be streamed to stderr, to a file, // to a logging daemon, or it can be set to be "silent". diff --git a/netsvcs/lib/Name_Handler.h b/netsvcs/lib/Name_Handler.h index 1642f1d0d3a..9b47952890a 100644 --- a/netsvcs/lib/Name_Handler.h +++ b/netsvcs/lib/Name_Handler.h @@ -14,10 +14,15 @@ // // ============================================================================ -#if !defined (ACE_NAME_HANDLER_H) +#ifndef ACE_NAME_HANDLER_H #define ACE_NAME_HANDLER_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Acceptor.h" #include "ace/SString.h" #include "ace/Naming_Context.h" diff --git a/netsvcs/lib/Server_Logging_Handler.h b/netsvcs/lib/Server_Logging_Handler.h index 493e572d008..3f20c55dbfa 100644 --- a/netsvcs/lib/Server_Logging_Handler.h +++ b/netsvcs/lib/Server_Logging_Handler.h @@ -5,16 +5,16 @@ // // = LIBRARY // ace -// +// // = FILENAME -// Server_Logging_Handler.h +// Server_Logging_Handler.h // // = AUTHOR // Doug Schmidt and Per Andersson -// +// // ============================================================================ -#if !defined (ACE_SERVER_LOGGING_HANDLER_H) +#ifndef ACE_SERVER_LOGGING_HANDLER_H #define ACE_SERVER_LOGGING_HANDLER_H #include "Log_Message_Receiver.h" @@ -35,21 +35,21 @@ typedef ACE_Server_Logging_Handler<Synch_Static_Receiver> Synch_Logging_Handler_ typedef ACE_Thr_Server_Logging_Handler<Synch_Static_Receiver> Synch_Thr_Logging_Handler_Static_Receiver; // NULL synched logging acceptor -typedef ACE_Server_Logging_Acceptor_T<Null_Synch_Logging_Handler_Static_Receiver, - Null_Synch_Static_Receiver, - ACE_Schedule_All_Reactive_Strategy<Null_Synch_Logging_Handler_Static_Receiver> > - Null_Synch_Logging_Handler_Static_Receiver_Acceptor; +typedef ACE_Server_Logging_Acceptor_T<Null_Synch_Logging_Handler_Static_Receiver, + Null_Synch_Static_Receiver, + ACE_Schedule_All_Reactive_Strategy<Null_Synch_Logging_Handler_Static_Receiver> > + Null_Synch_Logging_Handler_Static_Receiver_Acceptor; // NULL synched logging acceptors -typedef ACE_Server_Logging_Acceptor_T<Synch_Logging_Handler_Static_Receiver, - Synch_Static_Receiver, - ACE_Schedule_All_Reactive_Strategy<Synch_Logging_Handler_Static_Receiver> > - Synch_Logging_Handler_Static_Receiver_Acceptor; +typedef ACE_Server_Logging_Acceptor_T<Synch_Logging_Handler_Static_Receiver, + Synch_Static_Receiver, + ACE_Schedule_All_Reactive_Strategy<Synch_Logging_Handler_Static_Receiver> > + Synch_Logging_Handler_Static_Receiver_Acceptor; -typedef ACE_Server_Logging_Acceptor_T<Synch_Thr_Logging_Handler_Static_Receiver, - Synch_Static_Receiver, - ACE_Schedule_All_Threaded_Strategy<Synch_Thr_Logging_Handler_Static_Receiver> > - Synch_Thr_Logging_Handler_Static_Receiver_Acceptor; +typedef ACE_Server_Logging_Acceptor_T<Synch_Thr_Logging_Handler_Static_Receiver, + Synch_Static_Receiver, + ACE_Schedule_All_Threaded_Strategy<Synch_Thr_Logging_Handler_Static_Receiver> > + Synch_Thr_Logging_Handler_Static_Receiver_Acceptor; // typedefs for Logging Handlers & acceptors using a instance // based log message receivers. @@ -60,17 +60,17 @@ typedef Log_Message_Receiver<ACE_LOGGER_SYNCH> Synch_Receiver; // synched logging handlers typedef ACE_Server_Logging_Handler<Synch_Receiver> Synch_Logging_Handler_Receiver; typedef ACE_Thr_Server_Logging_Handler<Synch_Receiver> Synch_Thr_Logging_Handler_Receiver; - + // synched logging acceptors -typedef ACE_Server_Logging_Acceptor_T<Synch_Logging_Handler_Receiver, - Synch_Receiver, - ACE_Schedule_All_Reactive_Strategy<Synch_Logging_Handler_Receiver> > - Synch_Logging_Handler_Receiver_Acceptor; +typedef ACE_Server_Logging_Acceptor_T<Synch_Logging_Handler_Receiver, + Synch_Receiver, + ACE_Schedule_All_Reactive_Strategy<Synch_Logging_Handler_Receiver> > + Synch_Logging_Handler_Receiver_Acceptor; -typedef ACE_Server_Logging_Acceptor_T<Synch_Thr_Logging_Handler_Receiver, +typedef ACE_Server_Logging_Acceptor_T<Synch_Thr_Logging_Handler_Receiver, Synch_Receiver, - ACE_Schedule_All_Threaded_Strategy<Synch_Thr_Logging_Handler_Receiver> > - Synch_Thr_Logging_Handler_Receiver_Acceptor; + ACE_Schedule_All_Threaded_Strategy<Synch_Thr_Logging_Handler_Receiver> > + Synch_Thr_Logging_Handler_Receiver_Acceptor; // Define external acceptors diff --git a/netsvcs/lib/Server_Logging_Handler_T.h b/netsvcs/lib/Server_Logging_Handler_T.h index dafd1cbac60..9c0797f225e 100644 --- a/netsvcs/lib/Server_Logging_Handler_T.h +++ b/netsvcs/lib/Server_Logging_Handler_T.h @@ -14,10 +14,15 @@ // // ============================================================================ -#if !defined (ACE_SERVER_LOGGING_HANDLER_T_H) +#ifndef ACE_SERVER_LOGGING_HANDLER_T_H #define ACE_SERVER_LOGGING_HANDLER_T_H #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/TLI_Acceptor.h" #include "ace/SOCK_Acceptor.h" #include "ace/Acceptor.h" diff --git a/netsvcs/lib/TS_Clerk_Handler.h b/netsvcs/lib/TS_Clerk_Handler.h index c4a6caccdeb..617206f6d6c 100644 --- a/netsvcs/lib/TS_Clerk_Handler.h +++ b/netsvcs/lib/TS_Clerk_Handler.h @@ -5,25 +5,30 @@ // // = LIBRARY // ace -// +// // = FILENAME // TS_Clerk_Handler.h // // = AUTHOR -// Prashant Jain -// +// Prashant Jain +// // ============================================================================ -#if !defined (ACE_TS_CLERK_HANDLER_H) +#ifndef ACE_TS_CLERK_HANDLER_H #define ACE_TS_CLERK_HANDLER_H #include "ace/Connector.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Connector.h" #include "ace/Malloc.h" #include "ace/Time_Request_Reply.h" // A simple struct containing delta time and a sequence number -struct ACE_Time_Info +struct ACE_Time_Info { long delta_time_; ACE_UINT32 sequence_num_; @@ -39,7 +44,7 @@ class ACE_Svc_Export ACE_TS_Clerk_Handler : public ACE_Svc_Handler<ACE_SOCK_STRE // the updates to the Clerk Processor // // = DESCRIPTION - // The Clerk Processor uses send_request() to send a request for + // The Clerk Processor uses send_request() to send a request for // time update to a server. The Clerk Handler internally computes // the round trip delay for the reply to come back. Once it gets // the reply back from the server (handle_input), it adjusts the @@ -48,7 +53,7 @@ class ACE_Svc_Export ACE_TS_Clerk_Handler : public ACE_Svc_Handler<ACE_SOCK_STRE { public: ACE_TS_Clerk_Handler (ACE_TS_Clerk_Processor *processor = 0, - ACE_INET_Addr &addr = (ACE_INET_Addr &) ACE_Addr::sap_any); + ACE_INET_Addr &addr = (ACE_INET_Addr &) ACE_Addr::sap_any); // Default constructor. // = Set/get the current state @@ -58,7 +63,7 @@ public: CONNECTING, // During connection establishment. ESTABLISHED, // Connection is established and active. DISCONNECTING, // In the process of disconnecting. - FAILED // Connection has failed. + FAILED // Connection has failed. }; // = Set/get the current state. @@ -81,14 +86,14 @@ public: // Return the handle of the message_fifo_; virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); + ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); // Called when object is removed from the ACE_Reactor - + virtual int handle_input (ACE_HANDLE); // Receive time update from a server. virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); + const void *arg); // Restart connection asynchronously when timeout occurs. void remote_addr (ACE_INET_Addr &addr); @@ -104,7 +109,7 @@ protected: // Handle SIGPIPE. static void stderr_output (int = 0); - + enum { MAX_RETRY_TIMEOUT = 300 // 5 minutes is the maximum timeout. @@ -136,7 +141,7 @@ private: ACE_UINT32 cur_sequence_num_; // Next sequence number of time request (waiting for this update from - // the server). + // the server). ACE_Time_Info time_info_; // Record of current delta time and current sequence number @@ -147,7 +152,7 @@ class ACE_TS_Clerk_Processor : public ACE_Connector <ACE_TS_Clerk_Handler, ACE_S // This class manages all the connections to the servers along // with querying them periodically for time updates. // = DESCRIPTION - // The Clerk Processor creates connections to all the servers and + // The Clerk Processor creates connections to all the servers and // creates an ACE_TS_Clerk_Handler for each connection to handle // the requests and replies. It periodically sends a request for // time update through each of the handlers and uses the replies for @@ -158,7 +163,7 @@ public: // Default constructor virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); + const void *arg); // Query servers for time periodically (timeout value) int initiate_connection (ACE_TS_Clerk_Handler *, ACE_Synch_Options &); @@ -178,7 +183,7 @@ protected: // = Scheduling hooks. virtual int suspend (void); virtual int resume (void); - + private: int parse_args (int argc, char *argv[]); // Parse svc.conf arguments. @@ -195,8 +200,8 @@ private: // Allocator (used for reading/writing system time from/to shared memory) typedef ACE_Unbounded_Set <ACE_TS_Clerk_Handler *> HANDLER_SET; - typedef ACE_Unbounded_Set_Iterator <ACE_TS_Clerk_Handler *> HANDLER_SET_ITERATOR; - HANDLER_SET handler_set_; + typedef ACE_Unbounded_Set_Iterator <ACE_TS_Clerk_Handler *> HANDLER_SET_ITERATOR; + HANDLER_SET handler_set_; // Set of TS_Clerk_Handlers and iterator over the set. struct System_Time @@ -218,7 +223,7 @@ private: // Pool name for backing store int blocking_semantics_; - // Do a blocking/non-blocking connect + // Do a blocking/non-blocking connect ACE_UINT32 cur_sequence_num_; // Sequence number of next expected update from servers diff --git a/netsvcs/lib/TS_Server_Handler.h b/netsvcs/lib/TS_Server_Handler.h index 03f763e068d..c4bae7e32f7 100644 --- a/netsvcs/lib/TS_Server_Handler.h +++ b/netsvcs/lib/TS_Server_Handler.h @@ -5,19 +5,24 @@ // // = LIBRARY // ace -// +// // = FILENAME -// TS_Server_Handler.h +// TS_Server_Handler.h // // = AUTHOR -// Prashant Jain -// +// Prashant Jain +// // ============================================================================ -#if !defined (ACE_TS_SERVER_HANDLER_H) +#ifndef ACE_TS_SERVER_HANDLER_H #define ACE_TS_SERVER_HANDLER_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Acceptor.h" #include "ace/Time_Request_Reply.h" @@ -53,11 +58,11 @@ protected: virtual int recv_request (void); // Receive, frame, and decode the client's request. - + virtual int dispatch (void); // Dispatch the appropriate operation to handle the client's // request. - + virtual int send_request (ACE_Time_Request &); // Special kind of reply diff --git a/netsvcs/lib/Token_Handler.h b/netsvcs/lib/Token_Handler.h index a2ef8345f67..5649086e510 100644 --- a/netsvcs/lib/Token_Handler.h +++ b/netsvcs/lib/Token_Handler.h @@ -5,20 +5,25 @@ // // = LIBRARY // ACE -// +// // = FILENAME // Token_Handler.h // // = AUTHOR // Douglas C. Schmidt (schmidt@cs.wustl.edu) // Tim Harrison (harrison@cs.wustl.edu) -// +// // ============================================================================ -#if !defined (ACE_TOKEN_HANDLER_H) +#ifndef ACE_TOKEN_HANDLER_H #define ACE_TOKEN_HANDLER_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Acceptor.h" #include "ace/Local_Tokens.h" #include "ace/Token_Collection.h" @@ -86,11 +91,11 @@ protected: virtual int recv_request (void); // Receive, frame, and decode the client's request. - + virtual int dispatch (void); // Dispatch the appropriate operation to handle the client's // request. - + virtual int send_reply (ACE_UINT32 errnum); // Create and send a reply to the client. @@ -110,7 +115,7 @@ private: virtual ACE_Token_Proxy *create_proxy (void); // Switches on the type of token_request_ and creates a new - // Token_Proxy. + // Token_Proxy. ACE_Synch_Options request_options_; // Keeps track of the synchronization options (i.e., the timeout @@ -147,7 +152,7 @@ class ACE_TS_Mutex : public ACE_Local_Mutex { public: ACE_TS_Mutex (const char *name, - ACE_Token_Handler *th); + ACE_Token_Handler *th); // Creation. protected: @@ -177,7 +182,7 @@ class ACE_TS_RLock : public ACE_Local_RLock { public: ACE_TS_RLock (const char *name, - ACE_Token_Handler *th); + ACE_Token_Handler *th); // Creation. protected: @@ -207,7 +212,7 @@ class ACE_TS_WLock : public ACE_Local_WLock { public: ACE_TS_WLock (const char *name, - ACE_Token_Handler *th); + ACE_Token_Handler *th); // Creation. protected: |