From: Howard Chu Date: Fri, 6 Jun 2003 23:52:06 +0000 (+0000) Subject: Fix select/yield X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~922 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a8cac7ac80e272f4a98ff86aa52e9d122c3ab8f;p=openldap Fix select/yield --- 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 );