]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Don't pass WinSock error codes to strerror.
authorSimon Tatham <anakin@pobox.com>
Wed, 9 Oct 2013 18:36:56 +0000 (18:36 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 9 Oct 2013 18:36:56 +0000 (18:36 +0000)
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

index 00a8290d1a8b82a06b616c0c69a589b968d70551..4069c5d8714e0d77b76bcd73b0274760d3cb0976 100644 (file)
@@ -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);
 }
 
 /*