]> git.sur5r.net Git - openldap/commitdiff
ITS#4949 make config_syslog accumulate across multiple values
authorHoward Chu <hyc@openldap.org>
Sat, 5 May 2007 01:22:29 +0000 (01:22 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 5 May 2007 01:22:29 +0000 (01:22 +0000)
Can set to zero to explicitly clear it. (As well as just deleting
all values.)

servers/slapd/bconfig.c

index c1b8b4bfbf6e98a2c84c35820da8d63775079d53..07727a485588d257e52fcb3047b9e9bfd88681d7 100644 (file)
@@ -2576,8 +2576,6 @@ config_loglevel(ConfigArgs *c) {
                return 0;
        }
 
-       config_syslog = 0;
-
        for( i=1; i < c->argc; i++ ) {
                int     level;
 
@@ -2596,7 +2594,11 @@ config_loglevel(ConfigArgs *c) {
                                return( 1 );
                        }
                }
-               config_syslog |= level;
+               /* Explicitly setting a zero clears all the levels */
+               if ( level )
+                       config_syslog |= level;
+               else
+                       config_syslog = 0;
        }
        if ( slapMode & SLAP_SERVER_MODE ) {
                ldap_syslog = config_syslog;