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 ) {
"=> " 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:
send_ldap_result( op, rs );
}
- if ( refdn ) free( refdn );
+ free( refdn );
if ( nrefdn.bv_val ) free( nrefdn.bv_val );
done:
* LDAP_COMPARE_{TRUE|FALSE}) */
default:
/* only touch when activity actually took place... */
- if ( li->li_idle_timeout && lc ) {
+ if ( li->li_idle_timeout ) {
lc->lc_time = op->o_time;
}
Debug( LDAP_DEBUG_ANY, "slapd-distproc: "
"unable to init %sunderlying database \"%s\".\n",
lc->lc_common_li == NULL ? "common " : "", e->e_name.bv_val, 0 );
- return LDAP_CONSTRAINT_VIOLATION;
+ rc = LDAP_CONSTRAINT_VIOLATION;
+ goto done;
}
li = ca->be->be_private;
} else {
/* only touch when activity actually took place... */
- if ( li->li_idle_timeout && lc ) {
+ if ( li->li_idle_timeout ) {
lc->lc_time = op->o_time;
}
} else {
/* only touch when activity actually took place... */
- if ( li->li_idle_timeout && lc ) {
+ if ( li->li_idle_timeout ) {
lc->lc_time = op->o_time;
}
} else {
/* only touch when activity actually took place... */
- if ( li->li_idle_timeout && lc ) {
+ if ( li->li_idle_timeout ) {
lc->lc_time = op->o_time;
}
if ( rs != NULL )
rs->sr_text =
save_errno != ENOENT ? "internal error (bad directory)"
- : !is_rootDSE ? "internal error (missing directory)"
: "internal error (database directory does not exist)";
}
rs->sr_err = LDAP_OTHER;
goto return_results;
}
- new_parent_dn = &np->e_name;
+ np_dn = &np->e_name;
} else {
np_dn = NULL;
rc = mdb_id2name( &op, mdb_tool_txn, &idcursor, id, &dn, &ndn );
if ( rc ) {
rc = LDAP_OTHER;
- if ( e ) {
- mdb_entry_return( &op, e );
- e = NULL;
- }
goto done;
}
if ( tool_base != NULL ) {
static int
mdb_tool_index_finish()
{
- int i, rc;
+ int i, rc = 0;
ldap_pvt_thread_mutex_lock( &mdb_tool_index_mutex );
for ( i=1; i<mdb_tool_threads; i++ ) {
if ( mdb_tool_index_rec[i].ir_i == LDAP_BUSY ) {