* [Qemu-devel] [4251] Fix spurious VNC disconnects on Win32 (Herv?\195?\169 Poussineau).
@ 2008-04-24 23:40 Andrzej Zaborowski
0 siblings, 0 replies; only message in thread
From: Andrzej Zaborowski @ 2008-04-24 23:40 UTC (permalink / raw)
To: qemu-devel
Revision: 4251
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4251
Author: balrog
Date: 2008-04-24 23:40:55 +0000 (Thu, 24 Apr 2008)
Log Message:
-----------
Fix spurious VNC disconnects on Win32 (Herv?\195?\169 Poussineau).
Modified Paths:
--------------
trunk/vnc.c
Modified: trunk/vnc.c
===================================================================
--- trunk/vnc.c 2008-04-24 21:11:41 UTC (rev 4250)
+++ trunk/vnc.c 2008-04-24 23:40:55 UTC (rev 4251)
@@ -633,8 +633,18 @@
static int vnc_client_io_error(VncState *vs, int ret, int last_errno)
{
if (ret == 0 || ret == -1) {
- if (ret == -1 && (last_errno == EINTR || last_errno == EAGAIN))
- return 0;
+ if (ret == -1) {
+ switch (last_errno) {
+ case EINTR:
+ case EAGAIN:
+#ifdef _WIN32
+ case WSAEWOULDBLOCK:
+#endif
+ return 0;
+ default:
+ break;
+ }
+ }
VNC_DEBUG("Closing down client sock %d %d\n", ret, ret < 0 ? last_errno : 0);
qemu_set_fd_handler2(vs->csock, NULL, NULL, NULL, NULL);
@@ -2086,10 +2096,10 @@
struct sockaddr_in iaddr;
#ifndef _WIN32
struct sockaddr_un uaddr;
+ const char *p;
#endif
int reuse_addr, ret;
socklen_t addrlen;
- const char *p;
VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
const char *options;
int password = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-24 23:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 23:40 [Qemu-devel] [4251] Fix spurious VNC disconnects on Win32 (Herv?\195?\169 Poussineau) Andrzej Zaborowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).