diff options
Diffstat (limited to '')
-rw-r--r-- | agent/ChangeLog | 4 | ||||
-rw-r--r-- | agent/cache.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index 721b0c712..fb358f43b 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,7 @@ +2002-05-14 Werner Koch <[email protected]> + + * cache.c (housekeeping, agent_put_cache): Use our time() wrapper. + 2002-04-26 Werner Koch <[email protected]> * cache.c (agent_put_cache): Reinitialize the creation time and diff --git a/agent/cache.c b/agent/cache.c index 4819ad197..ed9c8cfd9 100644 --- a/agent/cache.c +++ b/agent/cache.c @@ -82,7 +82,7 @@ static void housekeeping (void) { ITEM r, rprev; - time_t current = time (NULL); + time_t current = gnupg_get_time (); /* first expire the actual data */ for (r=thecache; r; r = r->next) @@ -170,7 +170,7 @@ agent_put_cache (const char *key, const char *data, int ttl) } if (data) { - r->created = r->accessed = time (NULL); + r->created = r->accessed = gnupg_get_time (); r->ttl = ttl; r->pw = new_data (data, strlen (data)+1); if (!r->pw) @@ -185,7 +185,7 @@ agent_put_cache (const char *key, const char *data, int ttl) else { strcpy (r->key, key); - r->created = r->accessed = time (NULL); + r->created = r->accessed = gnupg_get_time (); r->ttl = ttl; r->pw = new_data (data, strlen (data)+1); if (!r->pw) @@ -223,7 +223,7 @@ agent_get_cache (const char *key) { /* put_cache does only put strings into the cache, so we don't need the lengths */ - r->accessed = time (NULL); + r->accessed = gnupg_get_time (); if (DBG_CACHE) log_debug ("... hit\n"); return r->pw->data; |