]> git.sur5r.net Git - openldap/commitdiff
More for ad_inlist
authorHoward Chu <hyc@openldap.org>
Mon, 31 Dec 2001 14:47:20 +0000 (14:47 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 31 Dec 2001 14:47:20 +0000 (14:47 +0000)
servers/slapd/ad.c

index adcbbcd1a32eeb047859b48b34fc6b4228c27288..440ecf8a59aa41e00d6e59930aef2833a6445070 100644 (file)
@@ -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;
+                       }
                }
        }