]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/index.c
error message from be_entry_put tool backend function
[openldap] / servers / slapd / back-ldbm / index.c
index d93b178805dfc189b97aa1ca9b94ab1f7f69b753..cd1c685fecd34737efa8a8a92dab878de15531cb 100644 (file)
@@ -1,7 +1,7 @@
 /* index.c - routines for dealing with attribute indexes */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -129,7 +129,7 @@ static int indexer(
        Backend *be,
        char *dbname,
        struct berval *atname,
-       struct berval **vals,
+       BVarray vals,
        ID id,
        int op,
        slap_mask_t mask )
@@ -138,7 +138,7 @@ static int indexer(
        const char *text;
     DBCache    *db;
        AttributeDescription *ad = NULL;
-       struct berval **keys;
+       struct berval *keys;
 
        assert( mask );
 
@@ -175,10 +175,10 @@ static int indexer(
                        atname, vals, &keys );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
-                       for( i=0; keys[i] != NULL; i++ ) {
-                               key_change( be, db, keys[i], id, op );
+                       for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               key_change( be, db, &keys[i], id, op );
                        }
-                       ber_bvecfree( keys );
+                       bvarray_free( keys );
                }
        }
 
@@ -191,10 +191,10 @@ static int indexer(
                        atname, vals, &keys );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
-                       for( i=0; keys[i] != NULL; i++ ) {
-                               key_change( be, db, keys[i], id, op );
+                       for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               key_change( be, db, &keys[i], id, op );
                        }
-                       ber_bvecfree( keys );
+                       bvarray_free( keys );
                }
        }
 
@@ -207,10 +207,10 @@ static int indexer(
                        atname, vals, &keys );
 
                if( rc == LDAP_SUCCESS && keys != NULL ) {
-                       for( i=0; keys[i] != NULL; i++ ) {
-                               key_change( be, db, keys[i], id, op );
+                       for( i=0; keys[i].bv_val != NULL; i++ ) {
+                               key_change( be, db, &keys[i], id, op );
                        }
-                       ber_bvecfree( keys );
+                       bvarray_free( keys );
                }
        }
 
@@ -222,7 +222,7 @@ static int index_at_values(
        Backend *be,
        AttributeType *type,
        struct berval *lang,
-       struct berval **vals,
+       BVarray vals,
        ID id,
        int op,
        char ** dbnamep,
@@ -292,7 +292,7 @@ static int index_at_values(
 int index_values(
        Backend *be,
        AttributeDescription *desc,
-       struct berval **vals,
+       BVarray vals,
        ID id,
        int op )
 {