summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ChangeLog25
-rw-r--r--ACE/ace/Addr.cpp2
-rw-r--r--ACE/ace/Event_Handler.h2
-rw-r--r--ACE/ace/Free_List.h4
-rw-r--r--ACE/ace/Logging_Strategy.h8
-rw-r--r--ACE/ace/Process_Manager.h4
-rw-r--r--ACE/ace/SSL/SSL_SOCK_Acceptor.inl2
-rw-r--r--ACE/ace/Select_Reactor_Base.h2
-rw-r--r--ACE/ace/Select_Reactor_T.h14
-rw-r--r--ACE/ace/Service_Config.cpp62
-rw-r--r--ACE/ace/Service_Gestalt.cpp31
-rw-r--r--ACE/ace/Service_Gestalt.h6
-rw-r--r--ACE/ace/Timer_Heap_T.h2
-rw-r--r--ACE/ace/Timer_Wheel_T.h4
14 files changed, 110 insertions, 58 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index d7df7bf04c4..42ea7adb8e8 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,28 @@
+Thu Feb 26 12:26:15 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/Addr.cpp:
+ Layout change
+
+ * ace/Event_Handler.h:
+ * ace/Free_List.h:
+ * ace/Logging_Strategy.h:
+ * ace/Process_Manager.h:
+ * ace/Select_Reactor_Base.h:
+ * ace/Select_Reactor_T.h:
+ * ace/SSL/SSL_SOCK_Acceptor.inl:
+ * ace/Timer_Heap_T.h:
+ * ace/Timer_Wheel_T.h:
+ Doxygen change
+
+ * ace/Service_Config.cpp:
+ * ace/Service_Gestalt.cpp:
+ * ace/Service_Gestalt.h:
+ Changed the default value of the logger_key argument
+ to open to 0. That way we can easier check if the user
+ has overridden the default. Also check the logger_key
+ in Service_Gestalt, so that it can be set through TAO.
+ This fixes bugzilla 3597
+
Thu Feb 26 10:45:58 UTC 2009 Olli Savia <ops@iki.fi>
* include/makeinclude/platform_linux_common.GNU:
diff --git a/ACE/ace/Addr.cpp b/ACE/ace/Addr.cpp
index f458e018eef..640bd561200 100644
--- a/ACE/ace/Addr.cpp
+++ b/ACE/ace/Addr.cpp
@@ -2,12 +2,10 @@
#include "ace/Addr.h"
-
ACE_RCSID (ace,
Addr,
"$Id$")
-
#if !defined (__ACE_INLINE__)
#include "ace/Addr.inl"
#endif /* __ACE_INLINE__ */
diff --git a/ACE/ace/Event_Handler.h b/ACE/ace/Event_Handler.h
index 3ccaf1d1aa0..1cbd19992fd 100644
--- a/ACE/ace/Event_Handler.h
+++ b/ACE/ace/Event_Handler.h
@@ -114,7 +114,7 @@ public:
/**
* Called when timer expires. @a current_time represents the current
- * time that the <Event_Handler> was selected for timeout
+ * time that the Event_Handler was selected for timeout
* dispatching and @a act is the asynchronous completion token that
* was passed in when <schedule_timer> was invoked.
*/
diff --git a/ACE/ace/Free_List.h b/ACE/ace/Free_List.h
index b77931fc45b..78c6042512c 100644
--- a/ACE/ace/Free_List.h
+++ b/ACE/ace/Free_List.h
@@ -73,8 +73,8 @@ public:
/**
* Constructor takes a @a mode (i.e., ACE_FREE_LIST_WITH_POOL or
* ACE_PURE_FREE_LIST), a count of the number of nodes to
- * <prealloc>, a low and high water mark (<lwm> and <hwm>) that
- * indicate when to allocate more nodes, an increment value (<inc>)
+ * @a prealloc, a low and high water mark (@a lwm and @a hwm) that
+ * indicate when to allocate more nodes, an increment value (@a inc)
* that indicates how many nodes to allocate when the list must
* grow.
*/
diff --git a/ACE/ace/Logging_Strategy.h b/ACE/ace/Logging_Strategy.h
index 6abe92cf7ea..d1436a6380c 100644
--- a/ACE/ace/Logging_Strategy.h
+++ b/ACE/ace/Logging_Strategy.h
@@ -93,7 +93,7 @@ public:
/**
* Timeout handler which tests logfile size. If the current logfile
- * size exceeds <max_size_>, the current logfile is closed, saved to
+ * size exceeds @c max_size_, the current logfile is closed, saved to
* logfile.old, and a new logfile is reopened.
*/
virtual int handle_timeout (const ACE_Time_Value& tv,
@@ -110,7 +110,7 @@ public:
* @arg '-n' Set the program name for the %n format specifier.
* @arg '-N' The maximum number of logfiles that we want created.
* @arg '-o' Specifies that we want the no standard logfiles ordering
- * (fastest processing in <handle_timeout>). Default is not to
+ * (fastest processing in handle_timeout()). Default is not to
* order logfiles.
* @arg '-p' Pass in the process-wide priorities to either enable (e.g.,
* DEBUG, INFO, WARNING, NOTICE, ERROR, CRITICAL, ALERT,
@@ -136,10 +136,10 @@ protected:
void priorities (ACE_TCHAR *priority_string,
ACE_Log_Msg::MASK_TYPE mask);
- /// Current thread's priority mask set by <priorities>
+ /// Current thread's priority mask set by @c priorities
u_long thread_priority_mask_;
- /// Process-wide priority mask set by <priorities>
+ /// Process-wide priority mask set by @c priorities
u_long process_priority_mask_;
/// Flags we keep track of.
diff --git a/ACE/ace/Process_Manager.h b/ACE/ace/Process_Manager.h
index fae20ed0488..03dfaae0070 100644
--- a/ACE/ace/Process_Manager.h
+++ b/ACE/ace/Process_Manager.h
@@ -337,9 +337,9 @@ public:
//@}
protected:
- // = These methods allow a <Process_Manager> to be an <Event_Handler>.
+ // = These methods allow a <Process_Manager> to be an Event_Handler.
- // As an <Event_Handler>, the <Process_Manager> automagically
+ // As an Event_Handler, the <Process_Manager> automagically
// detects child Processes exiting and calls notify_proc_handler()
// and remove(). This means that you don't have to (shouldn't!)
// call the wait(...) methods yourself.
diff --git a/ACE/ace/SSL/SSL_SOCK_Acceptor.inl b/ACE/ace/SSL/SSL_SOCK_Acceptor.inl
index 7fd8cb04095..fbbfaf2ccda 100644
--- a/ACE/ace/SSL/SSL_SOCK_Acceptor.inl
+++ b/ACE/ace/SSL/SSL_SOCK_Acceptor.inl
@@ -76,7 +76,7 @@ ACE_SSL_SOCK_Acceptor::close (void)
{
ACE_TRACE ("ACE_SSL_SOCK_Acceptor::close ()");
- int result = this->acceptor_.close ();
+ int const result = this->acceptor_.close ();
this->set_handle (ACE_INVALID_HANDLE);
return result;
diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h
index eafb19b0b8c..20c1e536e6a 100644
--- a/ACE/ace/Select_Reactor_Base.h
+++ b/ACE/ace/Select_Reactor_Base.h
@@ -502,7 +502,7 @@ protected:
/// appropriate point specified by <requeue_position_>.
virtual void renew (void) = 0;
- /// Check to see if the <Event_Handler> associated with @a handle is
+ /// Check to see if the Event_Handler associated with @a handle is
/// suspended. Returns 0 if not, 1 if so.
virtual int is_suspended_i (ACE_HANDLE handle) = 0;
diff --git a/ACE/ace/Select_Reactor_T.h b/ACE/ace/Select_Reactor_T.h
index 526db0fd9f6..3a3a9f32222 100644
--- a/ACE/ace/Select_Reactor_T.h
+++ b/ACE/ace/Select_Reactor_T.h
@@ -271,7 +271,7 @@ public:
ACE_Reactor_Mask mask);
/**
- * Removes the @a mask bind of <Event_Handler> whose handle is
+ * Removes the @a mask bind of Event_Handler whose handle is
* @a handle from the Select_Reactor. If there are no more bindings
* for this @a eh then it is removed from the Select_Reactor.
*/
@@ -280,7 +280,7 @@ public:
/**
* Removes all the @a mask bindings for handles in the @a handle_set
- * bind of <Event_Handler>. If there are no more bindings for any
+ * bind of Event_Handler. If there are no more bindings for any
* of these handlers then they are removed from the Select_Reactor.
*/
virtual int remove_handler (const ACE_Handle_Set &handle_set,
@@ -306,7 +306,7 @@ public:
/// Temporarily suspend the <Event_Handler> associated with @a eh.
virtual int suspend_handler (ACE_Event_Handler *eh);
- /// Temporarily suspend the <Event_Handler> associated with @a handle.
+ /// Temporarily suspend the Event_Handler associated with @a handle.
virtual int suspend_handler (ACE_HANDLE handle);
/// Suspend all @a handles in handle set temporarily.
@@ -315,11 +315,11 @@ public:
/// Suspend all the <Event_Handlers> in the Select_Reactor.
virtual int suspend_handlers (void);
- /// Resume a temporarily suspend <Event_Handler> associated with
+ /// Resume a temporarily suspend Event_Handler associated with
/// @a eh.
virtual int resume_handler (ACE_Event_Handler *eh);
- /// Resume a temporarily suspended <Event_Handler> associated with
+ /// Resume a temporarily suspended Event_Handler associated with
/// @a handle.
virtual int resume_handler (ACE_HANDLE handle);
@@ -384,7 +384,7 @@ public:
* Cancel the single ACE_Event_Handler that matches the @a timer_id
* value (which was returned from the <schedule> method). If arg is
* non-NULL then it will be set to point to the ``magic cookie''
- * argument passed in when the <Event_Handler> was registered. This
+ * argument passed in when the Event_Handler was registered. This
* makes it possible to free up the memory and avoid memory leaks.
* If @a dont_call_handle_close is 0 then the <handle_close> method
* of <event_handler> will be invoked. Returns 1 if cancellation
@@ -416,7 +416,7 @@ public:
/**
* Called by a thread when it wants to unblock the Select_Reactor.
* This wakeups the <ACE_Select_Reactor> if currently blocked in
- * <select>/<poll>. Pass over both the <Event_Handler> *and* the
+ * <select>/<poll>. Pass over both the Event_Handler *and* the
* @a mask to allow the caller to dictate which <Event_Handler>
* method the <Select_Reactor> will invoke. The ACE_Time_Value
* indicates how long to blocking trying to notify the
diff --git a/ACE/ace/Service_Config.cpp b/ACE/ace/Service_Config.cpp
index 9d6ed34c57d..2b2b47da179 100644
--- a/ACE/ace/Service_Config.cpp
+++ b/ACE/ace/Service_Config.cpp
@@ -273,48 +273,52 @@ ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
const ACE_TCHAR *key = logger_key;
if (key == 0 || ACE_OS::strcmp (key, ACE_DEFAULT_LOGGER_KEY) == 0)
- // Only use the static <logger_key_> if the caller doesn't
- // override it in the parameter list or if the key supplied is
- // equal to the default static logger key.
- key = ACE_Service_Config::current()->logger_key_;
+ {
+ // Only use the static <logger_key_> if the caller doesn't
+ // override it in the parameter list or if the key supplied is
+ // equal to the default static logger key.
+ key = ACE_Service_Config::current()->logger_key_;
+ }
else
- ACE_SET_BITS (flags, ACE_Log_Msg::LOGGER);
+ {
+ ACE_SET_BITS (flags, ACE_Log_Msg::LOGGER);
+ }
if (log_msg->open (program_name,
flags,
key) == -1)
return -1;
- if (ACE::debug ())
- ACE_DEBUG ((LM_STARTUP,
- ACE_TEXT ("starting up daemon %n\n")));
+ if (ACE::debug ())
+ ACE_DEBUG ((LM_STARTUP,
+ ACE_TEXT ("starting up daemon %n\n")));
- // Initialize the Service Repository (this will still work if
- // user forgets to define an object of type ACE_Service_Config).
- ACE_Service_Repository::instance (ACE_Service_Gestalt::MAX_SERVICES);
+ // Initialize the Service Repository (this will still work if
+ // user forgets to define an object of type ACE_Service_Config).
+ ACE_Service_Repository::instance (ACE_Service_Gestalt::MAX_SERVICES);
- // Initialize the ACE_Reactor (the ACE_Reactor should be the
- // same size as the ACE_Service_Repository).
- ACE_Reactor::instance ();
+ // Initialize the ACE_Reactor (the ACE_Reactor should be the
+ // same size as the ACE_Service_Repository).
+ ACE_Reactor::instance ();
- // There's no point in dealing with this on NT since it doesn't
- // really support signals very well...
+ // There's no point in dealing with this on NT since it doesn't
+ // really support signals very well...
#if !defined (ACE_LACKS_UNIX_SIGNALS)
- // Only attempt to register a signal handler for positive
- // signal numbers.
- if (ACE_Service_Config::signum_ > 0)
- {
- ACE_Sig_Set ss;
- ss.sig_add (ACE_Service_Config::signum_);
- if ((ACE_Reactor::instance () != 0) &&
- (ACE_Reactor::instance ()->register_handler
- (ss, ACE_Service_Config::signal_handler_) == -1))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("can't register signal handler\n")));
- }
+ // Only attempt to register a signal handler for positive
+ // signal numbers.
+ if (ACE_Service_Config::signum_ > 0)
+ {
+ ACE_Sig_Set ss;
+ ss.sig_add (ACE_Service_Config::signum_);
+ if ((ACE_Reactor::instance () != 0) &&
+ (ACE_Reactor::instance ()->register_handler
+ (ss, ACE_Service_Config::signal_handler_) == -1))
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("can't register signal handler\n")));
+ }
#endif /* ACE_LACKS_UNIX_SIGNALS */
- return 0;
+ return 0;
}
/// Return the global configuration instance. Always returns the same
diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp
index e0d65695311..95b3989009b 100644
--- a/ACE/ace/Service_Gestalt.cpp
+++ b/ACE/ace/Service_Gestalt.cpp
@@ -1008,8 +1008,8 @@ ACE_Service_Gestalt::init_svc_conf_file_queue (void)
int
-ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
- const ACE_TCHAR* /*logger_key*/,
+ACE_Service_Gestalt::open_i (const ACE_TCHAR program_name[],
+ const ACE_TCHAR* logger_key,
bool ignore_static_svcs,
bool ignore_default_svc_conf_file,
bool ignore_debug_flag)
@@ -1018,7 +1018,7 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
int result = 0;
ACE_Log_Msg *log_msg = ACE_LOG_MSG;
- no_static_svcs_ = ignore_static_svcs;
+ this->no_static_svcs_ = ignore_static_svcs;
// Record the current log setting upon entering this thread.
u_long old_process_mask = log_msg->priority_mask
@@ -1044,6 +1044,31 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
if (this->init_i () != 0)
return -1;
+ u_long flags = log_msg->flags ();
+
+ // Only use STDERR if the caller hasn't already set the flags.
+ if (flags == 0)
+ flags = (u_long) ACE_Log_Msg::STDERR;
+
+ const ACE_TCHAR *key = logger_key;
+
+ if (key == 0 || ACE_OS::strcmp (key, ACE_DEFAULT_LOGGER_KEY) == 0)
+ {
+ // Only use the static <logger_key_> if the caller doesn't
+ // override it in the parameter list or if the key supplied is
+ // equal to the default static logger key.
+ key = this->logger_key_;
+ }
+ else
+ {
+ ACE_SET_BITS (flags, ACE_Log_Msg::LOGGER);
+ }
+
+ if (log_msg->open (program_name,
+ flags,
+ key) == -1)
+ return -1;
+
if (!ignore_debug_flag)
{
// If -d was included as a startup parameter, the user wants debug
diff --git a/ACE/ace/Service_Gestalt.h b/ACE/ace/Service_Gestalt.h
index 569269c614a..191704e76b9 100644
--- a/ACE/ace/Service_Gestalt.h
+++ b/ACE/ace/Service_Gestalt.h
@@ -116,7 +116,7 @@ public:
* ACE_Log_Msg::priority_mask appropriately.
*/
int open (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
+ const ACE_TCHAR *logger_key = 0,
bool ignore_static_svcs = true,
bool ignore_default_svc_conf_file = false,
bool ignore_debug_flag = false);
@@ -173,7 +173,7 @@ public:
*/
int open (int argc,
ACE_TCHAR *argv[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
+ const ACE_TCHAR *logger_key = 0,
bool ignore_static_svcs = true,
bool ignore_default_svc_conf_file = false,
bool ignore_debug_flag = false);
@@ -337,7 +337,7 @@ protected:
* errors that occurred on failure and 0 otherwise.
*/
int open_i (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
+ const ACE_TCHAR *logger_key = 0,
bool ignore_static_svcs = true,
bool ignore_default_svc_conf_file = false,
bool ignore_debug_flag = false);
diff --git a/ACE/ace/Timer_Heap_T.h b/ACE/ace/Timer_Heap_T.h
index 75f3e98ad10..00c128b1aa9 100644
--- a/ACE/ace/Timer_Heap_T.h
+++ b/ACE/ace/Timer_Heap_T.h
@@ -143,7 +143,7 @@ public:
/**
* Cancel all timers associated with @a type. If @a dont_call_handle_close
- * is 0then the <functor> will be invoked. Returns number of timers
+ * is 0 then the <functor> will be invoked. Returns number of timers
* cancelled.
*/
virtual int cancel (const TYPE &type,
diff --git a/ACE/ace/Timer_Wheel_T.h b/ACE/ace/Timer_Wheel_T.h
index c30587594a5..40179f7a734 100644
--- a/ACE/ace/Timer_Wheel_T.h
+++ b/ACE/ace/Timer_Wheel_T.h
@@ -126,8 +126,8 @@ public:
virtual int reset_interval (long timer_id,
const ACE_Time_Value& interval);
- /// Cancel all timer associated with @a type. If <dont_call> is 0
- /// then the <functor> will be invoked. Returns number of timers
+ /// Cancel all timer associated with @a type. If @a dont_call_handle_close is
+ /// 0 then the <functor> will be invoked. Returns number of timers
/// cancelled.
virtual int cancel (const TYPE& type,
int dont_call_handle_close = 1);