summaryrefslogtreecommitdiff
path: root/source3/lib/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r--source3/lib/debug.c19
1 files changed, 7 insertions, 12 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 );