mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix bogus error codes
This commit is contained in:
parent
54ced52c04
commit
c5beffc94f
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user