diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/debug.c | 19 | ||||
-rw-r--r-- | source3/lib/messages.c | 11 |
2 files changed, 7 insertions, 23 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 23442a0193..dc675037a0 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -467,26 +467,19 @@ void debug_message_send(pid_t pid, const char *params_str) False); } - -#if 0 /**************************************************************************** Return current debug level. ****************************************************************************/ static void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len) { - char *debug_level_classes; + 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); - 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")); - } + SAFE_FREE(message); } -#endif /**************************************************************************** Init debugging (one time stuff) @@ -627,7 +620,7 @@ BOOL need_to_check_log_size( void ) { int maxlog; - if( debug_count++ < 100 ) + if( debug_count < 100 ) return( False ); maxlog = lp_max_log_size() * 1024; @@ -712,6 +705,8 @@ void check_log_size( void ) va_list ap; int old_errno = errno; + debug_count++; + if( stdout_logging ) { va_start( ap, format_str ); 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; } |