From: Howard Chu Date: Thu, 28 Apr 2005 18:36:47 +0000 (+0000) Subject: ITS#3671 more abandon/error checks X-Git-Tag: OPENLDAP_AC_BP~772 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a42760472165daeffbef84ce36713eb4253a4c2;p=openldap ITS#3671 more abandon/error checks --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 9b5fba66a0..3309eba85a 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -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 );