Skip to content
Snippets Groups Projects
Commit f151c2ac authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

Fix bogus error codes

parent 6fbd2ecc
No related branches found
No related tags found
No related merge requests found
......@@ -316,7 +316,7 @@ mdb_search( Operation *op, SlapReply *rs )
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 ) {
......@@ -862,12 +862,14 @@ nochange:
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;
......
......@@ -555,9 +555,7 @@ ID mdb_tool_entry_put(
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 );
......@@ -569,8 +567,7 @@ ID mdb_tool_entry_put(
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 );
......@@ -734,8 +731,8 @@ done:
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;
}
......@@ -794,8 +791,7 @@ ID mdb_tool_entry_modify(
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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment