1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-21 13:05:04 -05:00

Don't pass WinSock error codes to strerror.

Martin Prikryl helpfully points out that when I revamped the socket
error mechanism using toplevel callbacks, I also accidentally passed
the error code to the wrong function. Use winsock_error_string instead.

[originally from svn r10048]
This commit is contained in:
Simon Tatham 2013-10-09 18:36:56 +00:00
parent 7223973988
commit 2ca13fa995

View File

@ -1362,7 +1362,8 @@ static void socket_error_callback(void *vs)
/* /*
* An error has occurred on this socket. Pass it to the plug. * An error has occurred on this socket. Pass it to the plug.
*/ */
plug_closing(s->plug, strerror(s->pending_error), s->pending_error, 0); plug_closing(s->plug, winsock_error_string(s->pending_error),
s->pending_error, 0);
} }
/* /*