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 )
* 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 );