Add a fallback case to winsock_error_string() which makes it call
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 13 Nov 2012 18:36:27 +0000 (18:36 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 13 Nov 2012 18:36:27 +0000 (18:36 +0000)
commitae87c7f79fc346c83eda63a08ac6e2f619debcf8
treecc23694f2508e5b953232f926105d2a3d57a0114
parent0eece8a7f0c4e65b2f51572c8c792bed1b5a48d2
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.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@9704 cda61777-01e9-0310-a592-d414129be87e
windows/winnet.c