(nscd_run): Use time() value in prune_cache call, not timeout value,
authordrepper <drepper>
Thu, 28 Apr 2005 06:26:10 +0000 (06:26 +0000)
committerdrepper <drepper>
Thu, 28 Apr 2005 06:26:10 +0000 (06:26 +0000)
since the latter might be from another clock.

nscd/connections.c

index 86069b2..706d657 100644 (file)
@@ -1174,8 +1174,7 @@ handle_request: request received (Version = %d)"), req.version);
          /* The pthread_cond_timedwait() call timed out.  It is time
                 to clean up the cache.  */
          assert (my_number < lastdb);
-         prune_cache (&dbs[my_number],
-                      prune_ts.tv_sec + (prune_ts.tv_nsec >= 500000000));
+         prune_cache (&dbs[my_number], time (NULL));
 
          if (clock_gettime (timeout_clock, &prune_ts) == -1)
            /* Should never happen.  */