Skip to content

Commit

Permalink
* nscd/connections.c (nscd_run): Use time() value in prune_cache
Browse files Browse the repository at this point in the history
	call, not timeout value, since the latter might be from another clock.
  • Loading branch information
Ulrich Drepper committed Apr 28, 2005
1 parent ad52908 commit 75596b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2005-04-27 Ulrich Drepper <drepper@redhat.com>

* 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 <roland@redhat.com>

[BZ #877]
Expand Down
3 changes: 1 addition & 2 deletions nscd/connections.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 75596b9

Please sign in to comment.