From: Howard Chu Date: Mon, 25 Apr 2005 00:38:37 +0000 (+0000) Subject: ITS#3671 make sure to flush queue when able X-Git-Tag: OPENLDAP_AC_BP~803 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=75164fbe1c2896faa821d6980d5f0d7ed9851047;p=openldap ITS#3671 make sure to flush queue when able --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 973ec678d9..a88d4897da 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -841,6 +841,14 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mod op->o_tmpfree( rs.sr_ctrls[0], op->o_tmpmemctx ); op->o_private = sop.o_private; rs.sr_ctrls = NULL; + /* Check queue again here; if we were hanging in a send and eventually + * recovered, there may be more to send now. + */ + 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 ); + } return rs.sr_err; }