From: Kurt Zeilenga Date: Mon, 9 Sep 2002 23:25:22 +0000 (+0000) Subject: only optimize objectClass filters when (objectClass=*) is X-Git-Tag: NO_SLAP_OP_BLOCKS~996 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6fdfd4ceebaf21a83b4e409d1b015a505a4ca09;p=openldap only optimize objectClass filters when (objectClass=*) is presented... avoids (&(objectClass=*)(objectClass=foo)) problems. --- diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 0810625ada..1635bbd87c 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -731,16 +731,19 @@ static int oc_filter( switch(f->f_choice) { case LDAP_FILTER_PRESENT: - if (f->f_desc == slap_schema.si_ad_objectClass) + if (f->f_desc == slap_schema.si_ad_objectClass) { rc = 1; + } break; case LDAP_FILTER_AND: case LDAP_FILTER_OR: cur++; - for (f=f->f_and; f; f=f->f_next) - rc |= oc_filter(f, cur, max); + for (f=f->f_and; f; f=f->f_next) { + (void) oc_filter(f, cur, max); + } break; + default: break; }