]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/tools.c
don't send error with back-meta
[openldap] / servers / slapd / back-ldbm / tools.c
index 2f0b42c83029b4f7ac816954dfa7f0f44645f712..db2b31e91bcd5cd59238ab8b380915d5d5aae4f8 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -158,7 +158,7 @@ Entry* ldbm_tool_entry_get( BackendDB *be, ID id )
                return NULL;
        }
 
-       e = str2entry( data.dptr );
+       e = str2entry2( data.dptr, 0 );
        ldbm_datum_free( id2entry->dbc_db, data );
 
        if( e != NULL ) {
@@ -178,12 +178,13 @@ ID ldbm_tool_entry_put(
        int rc, len;
        ID id;
        Operation op = {0};
+       Opheader ohdr = {0};
 
        assert( slapMode & SLAP_TOOL_MODE );
        assert( id2entry != NULL );
 
-       assert( text );
-       assert( text->bv_val );
+       assert( text != NULL );
+       assert( text->bv_val != NULL );
        assert( text->bv_val[0] == '\0' );      /* overconservative? */
 
        if ( next_id_get( be, &id ) || id == NOID ) {
@@ -210,6 +211,7 @@ ID ldbm_tool_entry_put(
                return NOID;
        }
 
+       op.o_hdr = &ohdr;
        op.o_bd = be;
        op.o_tmpmemctx = NULL;
        op.o_tmpmfuncs = &ch_mfuncs;
@@ -259,6 +261,7 @@ int ldbm_tool_entry_reindex(
        int rc;
        Entry *e;
        Operation op = {0};
+       Opheader ohdr = {0};
 
        Debug( LDAP_DEBUG_ARGS, "=> ldbm_tool_entry_reindex( %ld )\n",
                (long) id, 0, 0 );
@@ -286,6 +289,7 @@ int ldbm_tool_entry_reindex(
 
        dn2id_add( be, &e->e_nname, e->e_id );
 
+       op.o_hdr = &ohdr;
        op.o_bd = be;
        op.o_tmpmemctx = NULL;
        op.o_tmpmfuncs = &ch_mfuncs;