From cf72a0f7c35ee791d5b4a81ef799d006e1b16bda Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 3 Mar 2011 16:11:38 +0100 Subject: Call WSAGetLastError() everywhere errno is read after a Winsock call. Winsock does NOT update errno for us, we have fetch the last error manually using WSAGetLastError(). --- libvncserver/httpd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libvncserver/httpd.c') diff --git a/libvncserver/httpd.c b/libvncserver/httpd.c index 320e6d2..ad2a51b 100755 --- a/libvncserver/httpd.c +++ b/libvncserver/httpd.c @@ -269,6 +269,9 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen) if (got == 0) { rfbErr("httpd: premature connection close\n"); } else { +#ifdef WIN32 + errno=WSAGetLastError(); +#endif if (errno == EAGAIN) { return; } -- cgit v1.2.1