]> git.sur5r.net Git - openldap/commitdiff
runqueue update according to the idle timer change
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 20 May 2003 22:13:21 +0000 (22:13 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 20 May 2003 22:13:21 +0000 (22:13 +0000)
servers/slapd/daemon.c

index b6d1dc42aaa64625b3752589e406c43364d67c39..2afa9767ab6e432d2ae07f215ae9c7c3bf9870fa 100644 (file)
@@ -1356,11 +1356,10 @@ slapd_daemon_task(
                        time_t diff = difftime( cat->tv_sec, now );
                        if ( diff == 0 )
                                diff = tdelta;
-                       if ( tvp == NULL )
-                               tvp = &tv;
-                       if ( diff < tv.tv_sec ) {
+                       if ( tvp == NULL || diff < tv.tv_sec ) {
                                tv.tv_sec = diff;
                                tv.tv_usec = 0;
+                               tvp = &tv;
                        }
                }
 #endif