summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-08-25 13:34:41 +0300
committerAlon Levy <alevy@redhat.com>2010-08-31 12:47:29 +0300
commit5b441c9bc500faec08e3aa5400c909310fefceb9 (patch)
treec0876f8eb61604411a9a0324f367617446b14363
parent4ef938f2b07dbd88965889f6e3c93f9a41baf0de (diff)
downloadspice-5b441c9bc500faec08e3aa5400c909310fefceb9.tar.gz
spice-5b441c9bc500faec08e3aa5400c909310fefceb9.tar.xz
spice-5b441c9bc500faec08e3aa5400c909310fefceb9.zip
server: when woken up by data ready to be read, don't call write.
This used to be a callback for the vdi_port "data ready" interrupt, which did indicate either data ready to read or data ready to write, but this is no longer the case now that virtio-serial is used. This seemingly simple fix prevents a race that needs to be fixed with another patch, see freedesktop bz #29903
-rw-r--r--server/reds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index 5829531e..ca587728 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1311,7 +1311,7 @@ static int read_from_vdi_port(void)
void vdagent_char_device_wakeup(SpiceCharDeviceInstance *sin)
{
- while (write_to_vdi_port() || read_from_vdi_port());
+ while (read_from_vdi_port());
}
static void reds_handle_agent_mouse_event()