]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/tools.c
Happy New Year!
[openldap] / servers / slapd / back-bdb / tools.c
index 91facca824085710812bb1ca01f3b0283a80771d..432f4f6aa16c74c3b01dd6bf32fcd9750b276536 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2014 The OpenLDAP Foundation.
+ * Copyright 2000-2016 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -832,6 +832,11 @@ int bdb_tool_entry_reindex(
                return -1;
        }
 
+       op.o_hdr = &ohdr;
+       op.o_bd = be;
+       op.o_tmpmemctx = NULL;
+       op.o_tmpmfuncs = &ch_mfuncs;
+
        if (! (slapMode & SLAP_TOOL_QUICK)) {
        rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags );
        if( rc != 0 ) {
@@ -856,11 +861,6 @@ int bdb_tool_entry_reindex(
                "=> " LDAP_XSTRING(bdb_tool_entry_reindex) "( %ld, \"%s\" )\n",
                (long) id, e->e_dn, 0 );
 
-       op.o_hdr = &ohdr;
-       op.o_bd = be;
-       op.o_tmpmemctx = NULL;
-       op.o_tmpmfuncs = &ch_mfuncs;
-
        rc = bdb_tool_index_add( &op, tid, e );
 
 done: