diff options
author | Alon Levy <alevy@redhat.com> | 2010-08-25 13:34:41 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-08-31 12:47:29 +0300 |
commit | 5b441c9bc500faec08e3aa5400c909310fefceb9 (patch) | |
tree | c0876f8eb61604411a9a0324f367617446b14363 /server/reds.c | |
parent | 4ef938f2b07dbd88965889f6e3c93f9a41baf0de (diff) | |
download | spice-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
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 2 |
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() |