/* tools.c - tools for slap tools */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
*/
#include "portable.h"
Datum key, data;
int rc, len;
ID id;
+ Operation op = {0};
assert( slapMode & SLAP_TOOL_MODE );
assert( id2entry != NULL );
return NOID;
}
- rc = index_entry_add( be, e, e->e_attrs );
+ op.o_bd = be;
+ op.o_tmpmemctx = NULL;
+ op.o_tmpmfuncs = &ch_mfuncs;
+
+ rc = index_entry_add( &op, e );
if( rc != 0 ) {
strncpy( text->bv_val, "index add failed", text->bv_len );
return NOID;
{
int rc;
Entry *e;
+ Operation op = {0};
#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_tool_entry_reindex: ID=%ld\n",
#endif
dn2id_add( be, &e->e_nname, e->e_id );
- rc = index_entry_add( be, e, e->e_attrs );
+
+ op.o_bd = be;
+ op.o_tmpmemctx = NULL;
+ op.o_tmpmfuncs = &ch_mfuncs;
+ rc = index_entry_add( &op, e );
entry_free( e );