diff options
author | Werner Koch <wk@gnupg.org> | 2015-06-04 17:34:33 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-06-04 17:34:55 +0200 |
commit | bf06d04f53296f4b4b73b9360cf1571559bb2295 (patch) | |
tree | 1cf683828bb43715bc1b9896886a4ceb14a62bdd /g10/tdbio.c | |
parent | gpg: Re-indent and improve documentation of g10/tdbio.c (diff) | |
download | gnupg2-bf06d04f53296f4b4b73b9360cf1571559bb2295.tar.xz gnupg2-bf06d04f53296f4b4b73b9360cf1571559bb2295.zip |
gpg: Fix output in case of a corrupted trustdb.
* g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
es_stdout.
* g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
list_trustdb only in verbose > 1 mode and let it dump to stderr.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index 4d65e61e8..b6b5938e2 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -1132,7 +1132,8 @@ upd_hashtable (ulong table, byte *key, int keylen, ulong newrecnum) { log_error ("hashtbl %lu: %lu/%d points to an invalid record %lu\n", table, hashrec, (msb % ITEMS_PER_HTBL_RECORD), item); - list_trustdb (NULL); /*FIXME: Bad - prints to stdout!!! */ + if (opt.verbose > 1) + list_trustdb (es_stderr, NULL); return GPG_ERR_TRUSTDB; } } |