]> git.sur5r.net Git - openldap/commitdiff
Fix select/yield
authorHoward Chu <hyc@openldap.org>
Fri, 6 Jun 2003 23:52:06 +0000 (23:52 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 6 Jun 2003 23:52:06 +0000 (23:52 +0000)
servers/slapd/daemon.c

index a361be936afc9bdac4f583d3107073e9a17317a9..752f343ba291f1946ad93fbfe1194b76f7146483 100644 (file)
@@ -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 );