]> git.sur5r.net Git - openldap/commitdiff
SLAP_NVALUES updates
authorKurt Zeilenga <kurt@openldap.org>
Mon, 17 Mar 2003 00:10:43 +0000 (00:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 17 Mar 2003 00:10:43 +0000 (00:10 +0000)
servers/slapd/back-ldbm/index.c
servers/slapd/back-ldbm/modify.c

index 8abb05195e80710907e5933299623f24c792106e..250a83241daee52b9cf1c1b51b5fcc5b13eb95cc 100644 (file)
@@ -309,7 +309,13 @@ index_entry(
 
        /* add each attribute to the indexes */
        for ( ; ap != NULL; ap = ap->a_next ) {
-               index_values( be, ap->a_desc, ap->a_vals, e->e_id, op );
+               index_values( be, ap->a_desc,
+#ifdef SLAP_NVALUES
+                       ap->a_nvals ? ap->a_nvals : ap->a_vals,
+#else
+                       ap->a_vals,
+#endif
+                       e->e_id, op );
        }
 
 #ifdef NEW_LOGGING
index 717c4691b392564b67ec0e15b2a29946158b0e45..11271c760006d70394f9ca21b146b24c9869bc30 100644 (file)
@@ -225,8 +225,13 @@ int ldbm_modify_internal(
        /* start with deleting the old index entries */
        for ( ap = save_attrs; ap != NULL; ap = ap->a_next ) {
                if ( ap->a_flags & SLAP_ATTR_IXDEL ) {
-                       rc = index_values( be, ap->a_desc, ap->a_vals, e->e_id,
-                                          SLAP_INDEX_DELETE_OP );
+                       rc = index_values( be, ap->a_desc,
+#ifdef SLAP_NVALUES
+                               ap->a_nvals ? ap->a_nvals : ap->a_vals,
+#else
+                               ap->a_vals,
+#endif
+                               e->e_id, SLAP_INDEX_DELETE_OP );
                        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG( BACK_LDBM, ERR,
@@ -246,8 +251,13 @@ int ldbm_modify_internal(
        /* add the new index entries */
        for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) {
                if ( ap->a_flags & SLAP_ATTR_IXADD ) {
-                       rc = index_values( be, ap->a_desc, ap->a_vals, e->e_id,
-                                          SLAP_INDEX_ADD_OP );
+                       rc = index_values( be, ap->a_desc,
+#ifdef SLAP_NVALUES
+                               ap->a_nvals ? ap->a_nvals : ap->a_vals,
+#else
+                               ap->a_vals,
+#endif
+                               e->e_id, SLAP_INDEX_ADD_OP );
                        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG( BACK_LDBM, ERR,