rs->sr_err = mdb_cursor_open( ltid, mdb->mi_id2entry, &mci );
if ( rs->sr_err ) {
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
- goto done;
+ return rs->sr_err;
}
if ( op->ors_deref & LDAP_DEREF_FINDING ) {
rs->sr_err = LDAP_SUCCESS;
done:
+ if( isc.mc )
+ mdb_cursor_close( isc.mc );
+ if (mci)
+ mdb_cursor_close( mci );
if ( moi == &opinfo ) {
mdb_txn_reset( moi->moi_txn );
LDAP_SLIST_REMOVE( &op->o_extra, &moi->moi_oe, OpExtra, oe_next );
}
- if( isc.mc )
- mdb_cursor_close( isc.mc );
if( rs->sr_v2ref ) {
ber_bvarray_free( rs->sr_v2ref );
rs->sr_v2ref = NULL;
rc = mdb_tool_index_add( &op, txn, e );
if( rc != 0 ) {
snprintf( text->bv_val, text->bv_len,
- "index_entry_add failed: %s (%d)",
- rc == LDAP_OTHER ? "Internal error" :
- mdb_strerror(rc), rc );
+ "index_entry_add failed: err=%d", rc );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(mdb_tool_entry_put) ": %s\n",
text->bv_val, 0, 0 );
rc = mdb_id2entry_add( &op, txn, e );
if( rc != 0 ) {
snprintf( text->bv_val, text->bv_len,
- "id2entry_add failed: %s (%d)",
- mdb_strerror(rc), rc );
+ "id2entry_add failed: err=%d", rc );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(mdb_tool_entry_put) ": %s\n",
text->bv_val, 0, 0 );
mdb_txn_abort( txi );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(mdb_tool_entry_reindex)
- ": txn_aborted! %s (%d)\n",
- mdb_strerror(rc), rc, 0 );
+ ": txn_aborted! err=%d\n",
+ rc, 0, 0 );
e->e_id = NOID;
txi = NULL;
}
rc = mdb_id2entry_update( &op, tid, e );
if( rc != 0 ) {
snprintf( text->bv_val, text->bv_len,
- "id2entry_add failed: %s (%d)",
- mdb_strerror(rc), rc );
+ "id2entry_update failed: err=%d", rc );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(mdb_tool_entry_modify) ": %s\n",
text->bv_val, 0, 0 );