diff options
author | Tim Potter <tpot@samba.org> | 2003-01-30 04:00:28 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-01-30 04:00:28 +0000 |
commit | 0310697963dd248504d1bf4c0bd4d98a5086bb14 (patch) | |
tree | 559f999455a071eb414dbcf664f370c0d7f15097 /source3/lib | |
parent | f26591b3ded7a4c691b1ebe75737da29f7b2b873 (diff) | |
download | samba-0310697963dd248504d1bf4c0bd4d98a5086bb14.tar.gz samba-0310697963dd248504d1bf4c0bd4d98a5086bb14.tar.bz2 samba-0310697963dd248504d1bf4c0bd4d98a5086bb14.zip |
Move debug level message handling into debug.c from messages.c
Removed duplicate message_register() for REQ_DEBUGLEVEL message.
(This used to be commit 6fee7196d695ca813a301b1e6d7da687b7e7bda5)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/debug.c | 14 | ||||
-rw-r--r-- | source3/lib/messages.c | 11 |
2 files changed, 14 insertions, 11 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 223bf8ebc2..dc675037a0 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -468,6 +468,20 @@ 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 *message = debug_list_class_names_and_levels(); + + DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n",(unsigned int)src)); + message_send_pid(src, MSG_DEBUGLEVEL, message, strlen(message) + 1, True); + + SAFE_FREE(message); +} + +/**************************************************************************** Init debugging (one time stuff) ****************************************************************************/ void debug_init(void) diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 38c3c411d4..53c9e3d2bc 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -91,16 +91,6 @@ static 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) -{ - DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n",(unsigned int)src)); - message_send_pid(src, MSG_DEBUGLEVEL, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS), True); -} - -/**************************************************************************** Initialise the messaging functions. ****************************************************************************/ @@ -120,7 +110,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; } |