From 2ca13fa995064ad2d97f42dd2e6abef04cccccd2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 9 Oct 2013 18:36:56 +0000 Subject: [PATCH] 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] --- windows/winnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/winnet.c b/windows/winnet.c index 00a8290d..4069c5d8 100644 --- a/windows/winnet.c +++ b/windows/winnet.c @@ -1362,7 +1362,8 @@ static void socket_error_callback(void *vs) /* * 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); } /*