ID eid, pid = 0;
mdb_op_info opinfo = {{{ 0 }}}, *moi = &opinfo;
int subentry;
+ int numads = mdb->mi_numads;
int success;
LDAP_SLIST_REMOVE( &op->o_extra, &opinfo.moi_oe, OpExtra, oe_next );
opinfo.moi_oe.oe_key = NULL;
if ( op->o_noop ) {
+ mdb->mi_numads = numads;
mdb_txn_abort( txn );
rs->sr_err = LDAP_X_NO_OPERATION;
txn = NULL;
rs->sr_err = mdb_txn_commit( txn );
txn = NULL;
if ( rs->sr_err != 0 ) {
+ mdb->mi_numads = numads;
rs->sr_text = "txn_commit failed";
Debug( LDAP_DEBUG_ANY,
LDAP_XSTRING(mdb_add) ": %s : %s (%d)\n",
if( moi == &opinfo ) {
if( txn != NULL ) {
+ mdb->mi_numads = numads;
mdb_txn_abort( txn );
}
if ( opinfo.moi_oe.oe_key ) {
LDAPControl **postread_ctrl = NULL;
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
+ int numads = mdb->mi_numads;
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(mdb_modify) ": %s\n",
op->o_req_dn.bv_val, 0, 0 );
LDAP_SLIST_REMOVE( &op->o_extra, &opinfo.moi_oe, OpExtra, oe_next );
opinfo.moi_oe.oe_key = NULL;
if( op->o_noop ) {
+ mdb->mi_numads = numads;
mdb_txn_abort( txn );
rs->sr_err = LDAP_X_NO_OPERATION;
txn = NULL;
goto return_results;
} else {
rs->sr_err = mdb_txn_commit( txn );
+ if ( rs->sr_err )
+ mdb->mi_numads = numads;
txn = NULL;
}
}
if( moi == &opinfo ) {
if( txn != NULL ) {
+ mdb->mi_numads = numads;
mdb_txn_abort( txn );
}
if ( opinfo.moi_oe.oe_key ) {
mdb_tool_txn = NULL;
idcursor = NULL;
if( rc != 0 ) {
+ mdb->mi_numads = 0;
snprintf( text->bv_val, text->bv_len,
"txn_commit failed: %s (%d)",
mdb_strerror(rc), rc );
if( rc == 0 ) {
rc = mdb_txn_commit( mdb_tool_txn );
if( rc != 0 ) {
+ mdb->mi_numads = 0;
snprintf( text->bv_val, text->bv_len,
"txn_commit failed: %s (%d)",
mdb_strerror(rc), rc );