From d9fec6d81595c49931e0b88cf2abeada6d7c3f42 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 31 Dec 2001 14:47:20 +0000 Subject: [PATCH] More for ad_inlist --- servers/slapd/ad.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; + } } } -- 2.39.5