]> git.sur5r.net Git - openldap/commitdiff
ITS#798: don't block on empty replog log in one-shot mode
authorKurt Zeilenga <kurt@openldap.org>
Tue, 3 Oct 2000 18:50:42 +0000 (18:50 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 3 Oct 2000 18:50:42 +0000 (18:50 +0000)
servers/slurpd/ri.c

index 9ea1a2217420c1c489f24e0c388def41bdb39905..f22da316265c2d6e284f0b16ff01dd0abb0379fc 100644 (file)
@@ -62,7 +62,13 @@ Ri_process(
     rq->rq_lock( rq );
     while ( !sglob->slurpd_shutdown &&
            (( re = rq->rq_gethead( rq )) == NULL )) {
-       /* No work - wait on condition variable */
+       /* No work */
+       if ( sglob->one_shot_mode ) {
+           /* give up if in one shot mode */
+           rq->rq_unlock( rq );
+           return 0;
+       }
+       /* wait on condition variable */
        ldap_pvt_thread_cond_wait( &rq->rq_more, &rq->rq_mutex );
     }