From: Howard Chu Date: Mon, 31 Dec 2001 14:47:20 +0000 (+0000) Subject: More for ad_inlist X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~389 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9fec6d81595c49931e0b88cf2abeada6d7c3f42;p=openldap More for ad_inlist --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index adcbbcd1a3..440ecf8a59 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -286,7 +286,6 @@ int ad_inlist( { for( ; attrs; attrs=attrs->an_next ) { ObjectClass *oc; - const char *text; int rc; if ( attrs->an_desc ) { @@ -325,6 +324,16 @@ int ad_inlist( if( rc ) return 1; } } + } else { + /* short-circuit this search next time around */ + if (!slap_schema.si_at_undefined->sat_ad) { + const char *text; + slap_bv2undef_ad(&attrs->an_name, + &attrs->an_desc, &text); + } else { + attrs->an_desc = + slap_schema.si_at_undefined->sat_ad; + } } }