From bb0ffbf38cb1955c9e400003add680eabcf706a6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 26 Apr 2019 13:21:15 +0200 Subject: [PATCH] lib/util: fix call to dbghdrclass() for DEBUGC() 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 Reviewed-by: Ralph Boehme --- lib/util/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/debug.h b/lib/util/debug.h index e6f54a7657f..bd85067dd4b 100644 --- a/lib/util/debug.h +++ b/lib/util/debug.h @@ -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 ) \ -- 2.11.4.GIT