diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/debug.c | 19 | ||||
-rw-r--r-- | source3/lib/messages.c | 21 |
2 files changed, 20 insertions, 20 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index dc1a55fb58..1b2f9ac350 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -468,6 +468,24 @@ void debug_message_send(pid_t pid, const char *params_str) /**************************************************************************** + Return current debug level. +****************************************************************************/ + +static void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len) +{ + char *debug_level_classes; + DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n",(unsigned int)src)); + + if ((debug_level_classes = debug_list_class_names_and_levels())) { + /*{ debug_level_classes = "test:1000";*/ + message_send_pid(src, MSG_DEBUGLEVEL, debug_level_classes, strlen(debug_level_classes) + 1, True); + SAFE_FREE(debug_level_classes); + } else { + DEBUG(0, ("debuglevel_message: error retrieving class levels!\n")); + } +} + +/**************************************************************************** Init debugging (one time stuff) ****************************************************************************/ void debug_init(void) @@ -481,6 +499,7 @@ void debug_init(void) initialised = True; message_register(MSG_DEBUG, debug_message); + message_register(MSG_REQ_DEBUGLEVEL, debuglevel_message); for(p = default_classname_table; *p; p++) { diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 38d5e4af92..c06644bc86 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -79,7 +79,7 @@ static void sig_usr1(void) A useful function for testing the message system. ****************************************************************************/ -void ping_message(int msg_type, pid_t src, void *buf, size_t len) +static void ping_message(int msg_type, pid_t src, void *buf, size_t len) { char *msg = buf ? buf : "none"; DEBUG(1,("INFO: Received PING message from PID %u [%s]\n",(unsigned int)src, msg)); @@ -87,24 +87,6 @@ void ping_message(int msg_type, pid_t src, void *buf, size_t len) } /**************************************************************************** - Return current debug level. -****************************************************************************/ - -void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len) -{ - char *debug_level_classes; - DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n",(unsigned int)src)); - - if ((debug_level_classes = debug_list_class_names_and_levels())) { - /*{ debug_level_classes = "test:1000";*/ - message_send_pid(src, MSG_DEBUGLEVEL, debug_level_classes, strlen(debug_level_classes) + 1, True); - SAFE_FREE(debug_level_classes); - } else { - DEBUG(0, ("debuglevel_message: error retrieving class levels!\n")); - } -} - -/**************************************************************************** Initialise the messaging functions. ****************************************************************************/ @@ -124,7 +106,6 @@ BOOL message_init(void) CatchSignal(SIGUSR1, SIGNAL_CAST sig_usr1); message_register(MSG_PING, ping_message); - message_register(MSG_REQ_DEBUGLEVEL, debuglevel_message); return True; } |