]> git.sur5r.net Git - openldap/commitdiff
fixes OPENLDAP_REL_ENG_2_2_0ALPHA
authorKurt Zeilenga <kurt@openldap.org>
Sun, 1 Jun 2003 00:14:11 +0000 (00:14 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 1 Jun 2003 00:14:11 +0000 (00:14 +0000)
servers/slapd/extended.c
servers/slapd/proto-slap.h

index a9a601476e9ef5df29cd86754955e1e34951a017..b853d7a27d213ff6f3644ba46ae1c2ef7cea64bc 100644 (file)
@@ -88,6 +88,24 @@ static struct {
 static struct extop_list *find_extop(
        struct extop_list *list, struct berval *oid );
 
+struct berval *
+get_supported_extop (int index)
+{
+       struct extop_list *ext;
+
+       /* linear scan is slow, but this way doesn't force a
+        * big change on root_dse.c, where this routine is used.
+        */
+       for (ext = supp_ext_list; ext != NULL && --index >= 0; ext = ext->next) {
+               ; /* empty */
+       }
+
+       if (ext == NULL) return NULL;
+
+       return &ext->oid;
+}
+
+
 int exop_root_dse_info( Entry *e )
 {
        AttributeDescription *ad_supportedExtension
index 050782828e19c3df65334670fe6c8b498586df25..5d378d991a9cfa658514c60c7a0c329821b0f990 100644 (file)
@@ -466,6 +466,8 @@ LDAP_SLAPD_F (int) extops_init LDAP_P(( void ));
 
 LDAP_SLAPD_F (int) extops_kill LDAP_P(( void ));
 
+LDAP_SLAPD_F (struct berval *) get_supported_extop LDAP_P((int index));
+
 /*
  *  * cancel.c
  *   */