From 75596b98a188edf513cd0ab306449198ea69f7bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Apr 2005 06:27:13 +0000 Subject: [PATCH] * nscd/connections.c (nscd_run): Use time() value in prune_cache call, not timeout value, since the latter might be from another clock. --- ChangeLog | 5 +++++ nscd/connections.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 548eac4..afd6dc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-27 Ulrich Drepper + + * nscd/connections.c (nscd_run): Use time() value in prune_cache + call, not timeout value, since the latter might be from another clock. + 2005-04-27 Roland McGrath [BZ #877] diff --git a/nscd/connections.c b/nscd/connections.c index 86069b2..706d657 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -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. */ -- 2.7.4