diff options
author | Werner Koch <[email protected]> | 2016-05-21 09:06:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-05-21 09:06:24 +0000 |
commit | fd973ee1c18aa8fe764e09ba4dff589309b2d78d (patch) | |
tree | 24e67820454ac0012fa5b0b455aaf23b63a4935a /g10/tofu.c | |
parent | gpg: Print "[ never ]" instead of err for validity. (diff) | |
download | gnupg-fd973ee1c18aa8fe764e09ba4dff589309b2d78d.tar.gz gnupg-fd973ee1c18aa8fe764e09ba4dff589309b2d78d.zip |
gpg: Fix the TOFU_STATS_LONG status.
* g10/tofu.c (show_statistics): Print TOFU STATS with formatting
characters.
--
We better leave the non-breaking space character in the status
messages so that the caller can make use of them.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/tofu.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/g10/tofu.c b/g10/tofu.c index e591aa58f..b73ad938b 100644 --- a/g10/tofu.c +++ b/g10/tofu.c @@ -2101,7 +2101,7 @@ get_trust (struct dbs *dbs, const char *fingerprint, const char *email, /* TRANSLATORS: Please translate the text found in the source file below. We don't directly internationalize that text so that we can tweak it without breaking translations. */ - const char *text = _("TOFU detected a binding conflict"); + char *text = _("TOFU detected a binding conflict"); char *textbuf; if (strcmp (text, "TOFU detected a binding conflict") == 0) /* No translation. Use the English text. */ @@ -2542,15 +2542,18 @@ show_statistics (struct dbs *dbs, const char *fingerprint, log_fatal ("error snatching memory stream\n"); msg = format_text (tmpmsg, 0, 72, 80); es_free (tmpmsg); - for (p=msg; *p; p++) - if (*p == '~') - *p = ' '; /* Print a status line but suppress the trailing LF. * Spaces are not percent escaped. */ if (*msg) write_status_buffer (STATUS_TOFU_STATS_LONG, msg, strlen (msg)-1, -1); + + /* Remove the non-breaking space markers. */ + for (p=msg; *p; p++) + if (*p == '~') + *p = ' '; + } log_string (GPGRT_LOG_INFO, msg); |