mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Merge branch 'STABLE-BRANCH-2-2' into wk-master
This commit is contained in:
commit
f574aabeeb
10 changed files with 93 additions and 11 deletions
|
@ -451,6 +451,7 @@ int agent_clear_passphrase (ctrl_t ctrl,
|
|||
/*-- cache.c --*/
|
||||
void initialize_module_cache (void);
|
||||
void deinitialize_module_cache (void);
|
||||
void agent_cache_housekeeping (void);
|
||||
void agent_flush_cache (void);
|
||||
int agent_put_cache (const char *key, cache_mode_t cache_mode,
|
||||
const char *data, int ttl);
|
||||
|
|
|
@ -258,6 +258,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)
|
||||
{
|
||||
|
|
|
@ -2398,6 +2398,9 @@ handle_tick (void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Need to check for expired cache entries. */
|
||||
agent_cache_housekeeping ();
|
||||
|
||||
/* Check whether the homedir is still available. */
|
||||
if (!shutdown_pending
|
||||
&& (!have_homedir_inotify || !reliable_homedir_inotify)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue