From cdc0a6655880c299e54fb0b034820ef4c8a1b834 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 3 Oct 2000 18:50:42 +0000 Subject: [PATCH] ITS#798: don't block on empty replog log in one-shot mode --- servers/slurpd/ri.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ); } -- 2.39.5