From: Howard Chu Date: Thu, 9 Jun 2005 22:55:21 +0000 (+0000) Subject: Tweak mask_to_verbs for multiple-bit masks X-Git-Tag: OPENLDAP_AC_BP~558 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0658ff91b754b2c76ede8d9d4ba82b8ba391e18a;p=openldap Tweak mask_to_verbs for multiple-bit masks --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index dbe56c88fc..941a4c9399 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -1834,6 +1834,7 @@ config_loglevel(ConfigArgs *c) { int i; char *next; slap_verbmasks loglevel_ops[] = { + { BER_BVC("Any"), -1 }, { BER_BVC("Trace"), LDAP_DEBUG_TRACE }, { BER_BVC("Packets"), LDAP_DEBUG_PACKETS }, { BER_BVC("Args"), LDAP_DEBUG_ARGS }, @@ -1849,7 +1850,6 @@ config_loglevel(ConfigArgs *c) { { BER_BVC("Cache"), LDAP_DEBUG_CACHE }, { BER_BVC("Index"), LDAP_DEBUG_INDEX }, { BER_BVC("Sync"), LDAP_DEBUG_SYNC }, - { BER_BVC("Any"), -1 }, { BER_BVNULL, 0 } }; diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 980e2ab105..62fc13e91e 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -719,6 +719,9 @@ verbs_to_mask(int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m) { return(0); } +/* Mask keywords that represent multiple bits should occur before single + * bit keywords in the verbmasks array. + */ int mask_to_verbs(slap_verbmasks *v, slap_mask_t m, BerVarray *bva) { int i; @@ -728,6 +731,7 @@ mask_to_verbs(slap_verbmasks *v, slap_mask_t m, BerVarray *bva) { if (!v[i].mask) continue; if (( m & v[i].mask ) == v[i].mask ) { value_add_one( bva, &v[i].word ); + m ^= v[i].mask; } } return 0;