]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/modrdn.c
ITS#4088 force cursors to use same locker
[openldap] / servers / slapd / back-bdb / modrdn.c
index 16025c4c486eb446d76bc4647401ca1af97f3e7c..cef5c72a6913644f0d25319afd740c8f80c8931e 100644 (file)
@@ -373,8 +373,8 @@ retry:      /* transaction retry */
                        /* newSuperior == oldParent? - checked above */
                        /* newSuperior == entry being moved?, if so ==> ERROR */
                        if ( dnIsSuffix( np_ndn, &e->e_nname )) {
-                               rs->sr_err = LDAP_NAMING_VIOLATION;
-                               rs->sr_text = "new superior is invalid";
+                               rs->sr_err = LDAP_NO_SUCH_OBJECT;
+                               rs->sr_text = "new superior not found";
                                goto return_results;
                        }
                        /* Get Entry with dn=newSuperior. Does newSuperior exist? */
@@ -404,7 +404,7 @@ retry:      /* transaction retry */
                                        ": newSup(ndn=%s) not here!\n",
                                        np_ndn->bv_val, 0, 0);
                                rs->sr_text = "new superior not found";
-                               rs->sr_err = LDAP_OTHER;
+                               rs->sr_err = LDAP_NO_SUCH_OBJECT;
                                goto return_results;
                        }
 
@@ -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 );