diff options
| author | Werner Koch <[email protected]> | 2018-03-06 15:26:26 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-03-06 15:26:26 +0000 |
| commit | f574aabeeb873f14a586f80cac16b857e6088534 (patch) | |
| tree | e84428513719a4e50cb1df1be509c12d34eb434a /agent/cache.c | |
| parent | gpg: Avoid writing a zero length last chunk in AEAD mode. (diff) | |
| parent | agent: Also evict cached items via a timer. (diff) | |
| download | gnupg-f574aabeeb873f14a586f80cac16b857e6088534.tar.gz gnupg-f574aabeeb873f14a586f80cac16b857e6088534.zip | |
Merge branch 'STABLE-BRANCH-2-2' into wk-master
Diffstat (limited to 'agent/cache.c')
| -rw-r--r-- | agent/cache.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/agent/cache.c b/agent/cache.c index 80d5f8d1e..ed5c97cd2 100644 --- a/agent/cache.c +++ b/agent/cache.c @@ -259,6 +259,26 @@ housekeeping (void) void +agent_cache_housekeeping (void) +{ + int res; + + if (DBG_CACHE) + log_debug ("agent_cache_housekeeping\n"); + + res = npth_mutex_lock (&cache_lock); + if (res) + log_fatal ("failed to acquire cache mutex: %s\n", strerror (res)); + + housekeeping (); + + res = npth_mutex_unlock (&cache_lock); + if (res) + log_fatal ("failed to release cache mutex: %s\n", strerror (res)); +} + + +void agent_flush_cache (void) { ITEM r; |
