Fix bug #8877 - Syslog broken owing to mistyping of debug_settings.syslog.
authorJoseph Tam <jtam.home@gmail.com>
Thu, 19 Apr 2012 18:46:16 +0000 (11:46 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 19 Apr 2012 22:06:12 +0000 (00:06 +0200)
Setting "syslog only = yes" did not divert log messages to syslog.  The test in
lib/util/debug.c:Debug1():747

   if( syslog_level < state.settings.syslog )

produces wrong results since .syslog is typed "bool" rather than "int".
The attached patch fixes this by typing this field correctly as "int".

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 20 00:06:12 CEST 2012 on sn-devel-104

lib/util/debug.h

index b3647a3345757deb145f7c912ba64e99d10d4263..256641852bf3e1fa01969f2086d3307240df15b9 100644 (file)
@@ -201,7 +201,7 @@ enum debug_logtype {DEBUG_DEFAULT_STDERR = 0, DEBUG_DEFAULT_STDOUT = 1, DEBUG_FI
 
 struct debug_settings {
        size_t max_log_size;
-       bool syslog;
+       int syslog;
        bool syslog_only;
        bool timestamp_logs;
        bool debug_prefix_timestamp;