mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common,w32: Add missing GetLastError->errno mapping.
* common/iobuf.c (file_filter, sock_filter): Add missing mapping. -- GnuPG-bug-id: 6528 (cherry picked from commit5e94470d05
) Also includes commita3be97df4d
This commit is contained in:
parent
bb157044a0
commit
1e9ac18f88
3 changed files with 9 additions and 6 deletions
|
@ -542,8 +542,8 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
|
|||
{
|
||||
if (size && !WriteFile (f, p, nbytes, &n, NULL))
|
||||
{
|
||||
int ec = (int) GetLastError ();
|
||||
rc = gpg_error_from_errno (ec);
|
||||
int ec = gnupg_w32_set_errno (-1);
|
||||
rc = gpg_error_from_syserror ();
|
||||
log_error ("%s: write error: %s (ec=%d)\n",
|
||||
a->fname, gpg_strerror (rc), ec);
|
||||
break;
|
||||
|
@ -820,7 +820,8 @@ sock_filter (void *opaque, int control, iobuf_t chain, byte * buf,
|
|||
if (n == SOCKET_ERROR)
|
||||
{
|
||||
int ec = (int) WSAGetLastError ();
|
||||
rc = gpg_error_from_errno (ec);
|
||||
gnupg_w32_set_errno (ec);
|
||||
rc = gpg_error_from_syserror ();
|
||||
log_error ("socket write error: ec=%d\n", ec);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue