diff options
author | NIIBE Yutaka <[email protected]> | 2019-06-07 04:28:07 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-06-07 04:28:07 +0000 |
commit | 1e9d61fb95e4813225a40f720231196abdb83992 (patch) | |
tree | 9ee18aef2b0193ae7aeedcb26cf298b563b2e866 /tools/gpgparsemail.c | |
parent | scd: Bring back --card-timeout option as deprecated. (diff) | |
download | gnupg-1e9d61fb95e4813225a40f720231196abdb83992.tar.gz gnupg-1e9d61fb95e4813225a40f720231196abdb83992.zip |
gpgparsemail: Die on parse error, printing errno thing.
* tools/gpgparsemail.c (parse_message): Revert the change.
* tools/rfc822parse.c (transition_to_body): Set ERRNO.
(transition_to_header, insert_header): Likewise.
--
In the comment of rfc822parse_* functions, it explicitly explained
setting ERRNO on error. For parser errors, it may not have
appropriate ERRNO, in such a case, use ENOENT.
Fixes-commit: c13e459ffeffb8c5387c44b3c04bb92b7111a75b
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'tools/gpgparsemail.c')
-rw-r--r-- | tools/gpgparsemail.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gpgparsemail.c b/tools/gpgparsemail.c index c5f4e6cd0..b12209755 100644 --- a/tools/gpgparsemail.c +++ b/tools/gpgparsemail.c @@ -654,7 +654,7 @@ parse_message (FILE *fp) if (rfc822parse_insert (msg, line, length)) - die ("parser failed"); + die ("parser failed: %s", strerror (errno)); if (info.hashing) { |