]> git.sur5r.net Git - openldap/commitdiff
Fix noop behavior, don't same TXN twice. Use consistent return code.
authorHoward Chu <hyc@openldap.org>
Mon, 17 Oct 2005 08:09:28 +0000 (08:09 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 17 Oct 2005 08:09:28 +0000 (08:09 +0000)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c

index 16861df67046f29652022218d311070df9eb6ced..f450f630bd6426602f9e39fb1a328bfb6c54d0d7 100644 (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 );
index 5e70633adf88749fb1990fb76656cc09e342c260..ad6f9eba1bafa611367e045525a7d77d3fff7805 100644 (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 ))
index 00d314e7a58516bbd373d89874781e1740ce0edd..908da30cc69f4286850972f35eaa8fcbba383ad7 100644 (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);
index 1bdebe513366690d75209887d1b6a82d77ec599f..cef5c72a6913644f0d25319afd740c8f80c8931e 100644 (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 );