diff options
Diffstat (limited to '')
-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; |