diff --git a/agent/ChangeLog b/agent/ChangeLog index 29e74bffa..721b0c712 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,12 @@ +2002-04-26 Werner Koch + + * cache.c (agent_put_cache): Reinitialize the creation time and + the ttl when reusing a slot. + + * call-scd.c (start_scd): Print debug messages only with debug + flags set. + * query.c (start_pinentry): Ditto. + 2002-04-25 Marcus Brinkmann * agent.h (agent_get_confirmation): Replace paramter prompt with diff --git a/agent/cache.c b/agent/cache.c index 445c4c5a8..4819ad197 100644 --- a/agent/cache.c +++ b/agent/cache.c @@ -139,7 +139,7 @@ housekeeping (void) /* Store DATA of length DATALEN in the cache under KEY and mark it - with a maximum lifetime of TTL seconds. If tehre is already data + with a maximum lifetime of TTL seconds. If there is already data under this key, it will be replaced. Using a DATA of NULL deletes the entry */ int @@ -170,6 +170,8 @@ agent_put_cache (const char *key, const char *data, int ttl) } if (data) { + r->created = r->accessed = time (NULL); + r->ttl = ttl; r->pw = new_data (data, strlen (data)+1); if (!r->pw) log_error ("out of core while allocating new cache item\n"); diff --git a/agent/call-scd.c b/agent/call-scd.c index 040201f25..f618912f2 100644 --- a/agent/call-scd.c +++ b/agent/call-scd.c @@ -136,7 +136,8 @@ start_scd (void) expected to tun as a single-thread (or may be in future using libpth) */ - log_debug ("no running SCdaemon - starting it\n"); + if (opt.verbose) + log_info ("no running SCdaemon - starting it\n"); if (fflush (NULL)) { @@ -166,7 +167,8 @@ start_scd (void) } scd_ctx = ctx; - log_debug ("connection to SCdaemon established\n"); + if (DBG_ASSUAN) + log_debug ("connection to SCdaemon established\n"); return 0; } diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 3741fa005..c39c8c4e0 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -165,7 +165,7 @@ i18n_init (void) -/* Use by gcry for logging */ +/* Used by gcry for logging */ static void my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr) { diff --git a/agent/query.c b/agent/query.c index c7e05a099..7a20b1498 100644 --- a/agent/query.c +++ b/agent/query.c @@ -63,8 +63,8 @@ start_pinentry (void) expected to tun as a single-thread (or may be in future using libpth) */ - - log_debug ("no running PIN Entry - starting it\n"); + if (opt.verbose) + log_info ("no running PIN Entry - starting it\n"); if (fflush (NULL)) { @@ -99,8 +99,9 @@ start_pinentry (void) return seterr (No_PIN_Entry); } entry_ctx = ctx; - - log_debug ("connection to PIN entry established\n"); + + if (DBG_ASSUAN) + log_debug ("connection to PIN entry established\n"); rc = assuan_transact (entry_ctx, opt.no_grab? "OPTION no-grab":"OPTION grab",