]> git.sur5r.net Git - openldap/commitdiff
ITS#3671 make sure to flush queue when able
authorHoward Chu <hyc@openldap.org>
Mon, 25 Apr 2005 00:38:37 +0000 (00:38 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 25 Apr 2005 00:38:37 +0000 (00:38 +0000)
servers/slapd/overlays/syncprov.c

index 973ec678d95b437f1e3d564b5b354a31fddf4045..a88d4897da798e5dc5c5ac464110ce8970d63949 100644 (file)
@@ -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;
 }