From d9d584e922b0e4923f5e4711dfd9ac621a83a038 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 30 Oct 2009 17:46:38 +0000 Subject: [PATCH] Alternate ITS#6324 fix. Use bitmask, handle -1 (LDAP_DEBUG_ANY) specially. --- servers/slapd/bconfig.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 191a497ae4..e9b03e5df7 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3052,7 +3052,7 @@ static int loglevel_init( void ) { slap_verbmasks lo[] = { - { BER_BVC("Any"), LDAP_DEBUG_ANY }, + { BER_BVC("Any"), (slap_mask_t) LDAP_DEBUG_ANY }, { BER_BVC("Trace"), LDAP_DEBUG_TRACE }, { BER_BVC("Packets"), LDAP_DEBUG_PACKETS }, { BER_BVC("Args"), LDAP_DEBUG_ARGS }, @@ -3204,10 +3204,11 @@ loglevel_print( FILE *out ) fprintf( out, "Installed log subsystems:\n\n" ); for ( i = 0; !BER_BVISNULL( &loglevel_ops[ i ].word ); i++ ) { - fprintf( out, "\t%-30s (%u, 0x%x)\n", - loglevel_ops[ i ].word.bv_val, - (unsigned) loglevel_ops[ i ].mask, - (unsigned) loglevel_ops[ i ].mask ); + unsigned mask = loglevel_ops[ i ].mask & 0xffffffffUL; + fprintf( out, + (mask == ((slap_mask_t) -1 & 0xffffffffUL) + ? "\t%-30s (-1, 0xffffffff)\n" : "\t%-30s (%u, 0x%x)\n"), + loglevel_ops[ i ].word.bv_val, mask, mask ); } fprintf( out, "\nNOTE: custom log subsystems may be later installed " -- 2.39.5