lib/util: fix call to dbghdrclass() for DEBUGC()
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Apr 2019 11:21:15 +0000 (13:21 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 28 May 2019 07:16:25 +0000 (07:16 +0000)
dbghdrclass() sets the global 'current_msg_class' and for that
DEBUGC() should pass the given dbgc_class instead of the per file
DBGC_CLASS.

This is important with the new per class logfile with:

 log level = 1 dsdb_audit:10@/var/log/samba/log.dsdb_audit

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/util/debug.h

index e6f54a7657f074c00a89998c368f328fe305e40c..bd85067dd4be541a248c67018745ad0a9e07cd72 100644 (file)
@@ -201,7 +201,7 @@ void debuglevel_set_class(size_t idx, int level);
 #define DEBUGC( dbgc_class, level, body ) \
   (void)( ((level) <= MAX_DEBUG_LEVEL) && \
        unlikely(debuglevel_get_class(dbgc_class) >= (level))             \
-       && (dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ )) \
+       && (dbghdrclass( level, dbgc_class, __location__, __FUNCTION__ )) \
        && (dbgtext body) )
 
 #define DEBUGADD( level, body ) \