From: Hallvard Furuseth Date: Fri, 30 Oct 2009 17:46:38 +0000 (+0000) Subject: Alternate ITS#6324 fix. Use bitmask, handle -1 (LDAP_DEBUG_ANY) specially. X-Git-Tag: ACLCHECK_0~152 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9d584e922b0e4923f5e4711dfd9ac621a83a038;p=openldap Alternate ITS#6324 fix. Use bitmask, handle -1 (LDAP_DEBUG_ANY) specially. --- 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 "