/* index.c - routines for dealing with attribute indexes */
/* $OpenLDAP$ */
/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
int
index_entry(
- Backend *be,
+ Backend *be,
int op,
- Entry *e,
- Attribute *ap )
+ Entry *e )
{
+ Attribute *ap = e->e_attrs;
#ifdef NEW_LOGGING
LDAP_LOG( INDEX, ENTRY,
"index_entry: %s (%s)%ld\n", op == SLAP_INDEX_ADD_OP ? "add" : "del",
/* 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,
+#else
+ ap->a_vals,
+#endif
+ e->e_id, op );
}
#ifdef NEW_LOGGING