]> git.sur5r.net Git - openldap/commitdiff
Alternate ITS#6324 fix. Use bitmask, handle -1 (LDAP_DEBUG_ANY) specially.
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 30 Oct 2009 17:46:38 +0000 (17:46 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 30 Oct 2009 17:46:38 +0000 (17:46 +0000)
servers/slapd/bconfig.c

index 191a497ae40406fc5e95cd7fd6d27561fd1def7b..e9b03e5df777ec178745c5997f8f74c43b218fe9 100644 (file)
@@ -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 "