[Spice-commits] 2 commits - server/reds.c
Alon Levy
alon at kemper.freedesktop.org
Tue Aug 31 02:58:26 PDT 2010
server/reds.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 5b441c9bc500faec08e3aa5400c909310fefceb9
Author: Alon Levy <alevy at redhat.com>
Date: Wed Aug 25 13:34:41 2010 +0300
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
diff --git a/server/reds.c b/server/reds.c
index 5829531..ca58772 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()
commit 4ef938f2b07dbd88965889f6e3c93f9a41baf0de
Author: Alon Levy <alevy at redhat.com>
Date: Wed Aug 25 13:34:41 2010 +0300
server: retry mouse send on queue full
diff --git a/server/reds.c b/server/reds.c
index a4f3aa1..5829531 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1324,6 +1324,7 @@ static void reds_handle_agent_mouse_event()
}
if (reds->mig_target || !(ring_item = ring_get_head(&reds->agent_state.internal_bufs))) {
reds->inputs_state->pending_mouse_event = TRUE;
+ vdi_port_write_timer_start();
return;
}
reds->inputs_state->pending_mouse_event = FALSE;
More information about the Spice-commits
mailing list