]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/util: fix call to dbghdrclass() for DEBUGC()
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Apr 2019 11:21:15 +0000 (13:21 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Aug 2019 07:32:20 +0000 (07:32 +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>
(similar to commit bb0ffbf38cb1955c9e400003add680eabcf706a6)

lib/util/debug.h

index 2895d15788752dc50ff8381f38cc1d385880b499..fd2c18791b5a248050ae14f6b23075788c07e698 100644 (file)
@@ -201,7 +201,7 @@ extern int  *DEBUGLEVEL_CLASS;
 #define DEBUGC( dbgc_class, level, body ) \
   (void)( ((level) <= MAX_DEBUG_LEVEL) && \
          unlikely(DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))           \
-       && (dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ )) \
+       && (dbghdrclass( level, dbgc_class, __location__, __FUNCTION__ )) \
        && (dbgtext body) )
 
 #define DEBUGADD( level, body ) \