mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Print status line and proper diagnostics for write errors.
* common/iobuf.c (file_filter): Improve diagnostics. * g10/build-packet.c (do_plaintext): Make sure to cache all error cases. -- GnuPG-bug-id: 6528
This commit is contained in:
parent
51e44da6fa
commit
8425cdcc8e
3 changed files with 20 additions and 6 deletions
|
@ -483,7 +483,8 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
|
|||
if (ec != ERROR_BROKEN_PIPE)
|
||||
{
|
||||
rc = gpg_error_from_errno (ec);
|
||||
log_error ("%s: read error: ec=%d\n", a->fname, ec);
|
||||
log_error ("%s: read error: %s (ec=%d)\n",
|
||||
a->fname, gpg_strerror (rc), ec);
|
||||
}
|
||||
}
|
||||
else if (!nread)
|
||||
|
@ -543,7 +544,8 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
|
|||
{
|
||||
int ec = (int) GetLastError ();
|
||||
rc = gpg_error_from_errno (ec);
|
||||
log_error ("%s: write error: ec=%d\n", a->fname, ec);
|
||||
log_error ("%s: write error: %s (ec=%d)\n",
|
||||
a->fname, gpg_strerror (rc), ec);
|
||||
break;
|
||||
}
|
||||
p += n;
|
||||
|
@ -601,7 +603,8 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
|
|||
if (ec != ERROR_BROKEN_PIPE)
|
||||
{
|
||||
rc = gpg_error_from_errno (ec);
|
||||
log_error ("%s: read error: ec=%d\n", a->fname, ec);
|
||||
log_error ("%s: read error: %s (ec=%d)\n",
|
||||
a->fname, gpg_strerror (rc), ec);
|
||||
}
|
||||
a->npeeked = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue