]> git.sur5r.net Git - openldap/commitdiff
ITS#3671 more abandon/error checks
authorHoward Chu <hyc@openldap.org>
Thu, 28 Apr 2005 18:36:47 +0000 (18:36 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 28 Apr 2005 18:36:47 +0000 (18:36 +0000)
servers/slapd/overlays/syncprov.c

index 9b5fba66a08814fa8551c11aebe64658ce56a0b6..3309eba85a85310f41f78684052032c260bbca88 100644 (file)
@@ -784,6 +784,11 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mod
                        return syncprov_qresp( opc, so, mode );
                }
                ldap_pvt_thread_mutex_unlock( &so->s_mutex );
+
+               /* If syncprov_qplay returned any other error, bail out. */
+               if ( rs.sr_err ) {
+                       return rs.sr_err;
+               }
        } else {
                /* Queueing not allowed and conn is busy, give up */
                if ( sop.o_conn->c_writewaiter )
@@ -847,8 +852,10 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mod
         * recovered, there may be more to send now. But don't check if the
         * original psearch has been abandoned.
         */
-       if ( !so->s_op->o_abandon && rs.sr_err == LDAP_SUCCESS && queue
-               && so->s_res ) {
+       if ( so->s_op->o_abandon )
+               return SLAPD_ABANDON;
+
+       if ( rs.sr_err == LDAP_SUCCESS && queue && so->s_res ) {
                ldap_pvt_thread_mutex_lock( &so->s_mutex );
                rs.sr_err = syncprov_qplay( &sop, on, so );
                ldap_pvt_thread_mutex_unlock( &so->s_mutex );