summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-04-27 15:49:40 +0200
committerWerner Koch <wk@gnupg.org>2002-04-27 15:49:40 +0200
commit8460fb4a7325d1f009dae07c39dd48309cb7d361 (patch)
tree1ba30ec7a09fed9c152075b79e093c8491e509b2 /agent
parent* call-agent.c (start_agent): Make copies of old locales and check (diff)
downloadgnupg2-8460fb4a7325d1f009dae07c39dd48309cb7d361.tar.xz
gnupg2-8460fb4a7325d1f009dae07c39dd48309cb7d361.zip
Debug message cleanups.
Fixed passphrase caching.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog9
-rw-r--r--agent/cache.c4
-rw-r--r--agent/call-scd.c6
-rw-r--r--agent/gpg-agent.c2
-rw-r--r--agent/query.c9
5 files changed, 22 insertions, 8 deletions
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 <wk@gnupg.org>
+
+ * 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 <marcus@g10code.de>
* 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",