]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Add a fallback case to winsock_error_string() which makes it call
authorSimon Tatham <anakin@pobox.com>
Tue, 13 Nov 2012 18:36:27 +0000 (18:36 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 13 Nov 2012 18:36:27 +0000 (18:36 +0000)
commit69113b16b1131928dbe4fdf03eff338c99e54c20
treecc23694f2508e5b953232f926105d2a3d57a0114
parent251876b5947a5246d76c59f7616e815062f1fea2
Add a fallback case to winsock_error_string() which makes it call
FormatMessage to get the OS's text for any error not in our own
translation table. Should eliminate the frustrating 'unknown error'.

(I haven't chosen to use FormatMessage unconditionally, because it
comes out with enormous messages along the lines of "No connection
could be made because the target machine actively refused it" in place
of "Connection refused" and I'm Unixy enough to prefer the latter.
Also, on older Windowses, Winsock error codes are in a separate API
segment and don't work with FormatMessage anyway.)

[originally from svn r9704]
windows/winnet.c