From 6a8cac7ac80e272f4a98ff86aa52e9d122c3ab8f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 6 Jun 2003 23:52:06 +0000 Subject: [PATCH] Fix select/yield --- servers/slapd/daemon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index a361be936a..752f343ba2 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1334,7 +1334,14 @@ slapd_daemon_task( ldap_pvt_runqueue_persistent_backload( &syncrepl_rq ); } - tvp = at ? &tv : NULL; + if ( at +#if defined(HAVE_YIELDING_SELECT) || defined(NO_THREADS) + && ( tv.tv_sec || tv.tv_usec ) +#endif + ) + tvp = &tv; + else + tvp = NULL; #ifdef LDAP_SYNCREPL ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex ); -- 2.39.5