Fix noop behavior, don't same TXN twice. Use consistent return code.

This commit is contained in:
Howard Chu 2005-10-17 08:09:28 +00:00
parent 5c125d19a9
commit 6e2c36b03d
4 changed files with 9 additions and 5 deletions

View File

@ -378,6 +378,7 @@ retry: /* transaction retry */
rs->sr_text = "txn_abort (no-op) failed";
} else {
rs->sr_err = LDAP_NO_OPERATION;
ltid = NULL;
goto return_results;
}
@ -427,8 +428,8 @@ return_results:
if( ltid != NULL ) {
TXN_ABORT( ltid );
op->o_private = NULL;
}
op->o_private = NULL;
if( postread_ctrl != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );

View File

@ -447,6 +447,7 @@ retry: /* transaction retry */
rs->sr_text = "txn_abort (no-op) failed";
} else {
rs->sr_err = LDAP_NO_OPERATION;
ltid = NULL;
goto return_results;
}
} else {
@ -502,8 +503,8 @@ return_results:
if( ltid != NULL ) {
TXN_ABORT( ltid );
op->o_private = NULL;
}
op->o_private = NULL;
send_ldap_result( op, rs );
if ( !SLAP_SHADOW( op->o_bd ))

View File

@ -528,6 +528,7 @@ retry: /* transaction retry */
rs->sr_text = "txn_abort (no-op) failed";
} else {
rs->sr_err = LDAP_NO_OPERATION;
ltid = NULL;
goto return_results;
}
} else {
@ -588,8 +589,8 @@ return_results:
done:
if( ltid != NULL ) {
TXN_ABORT( ltid );
op->o_private = NULL;
}
op->o_private = NULL;
if( e != NULL ) {
bdb_unlocked_cache_return_entry_w (&bdb->bi_cache, e);

View File

@ -728,7 +728,8 @@ retry: /* transaction retry */
if(( rs->sr_err=TXN_ABORT( ltid )) != 0 ) {
rs->sr_text = "txn_abort (no-op) failed";
} else {
rs->sr_err = LDAP_SUCCESS;
rs->sr_err = LDAP_NO_OPERATION;
ltid = NULL;
goto return_results;
}
@ -831,8 +832,8 @@ done:
if( ltid != NULL ) {
TXN_ABORT( ltid );
op->o_private = NULL;
}
op->o_private = NULL;
if( preread_ctrl != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );