From: Kurt Zeilenga Date: Tue, 3 Oct 2000 18:50:42 +0000 (+0000) Subject: ITS#798: don't block on empty replog log in one-shot mode X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1822 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cdc0a6655880c299e54fb0b034820ef4c8a1b834;p=openldap ITS#798: don't block on empty replog log in one-shot mode --- diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index 9ea1a22174..f22da31626 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -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 ); }