[Spice-devel] [PATCH 0.8 2/9] server: Don't stop writing agent data to the guest when the client disconnects
Hans de Goede
hdegoede at redhat.com
Fri Apr 1 08:13:02 PDT 2011
write_to_vdi_port() was checking for reds->agent_state.connected to determine
wether it could write queued data. But agent_state.connected reflects if
*both* ends are connected. If the client has disconnected, but the guest agent
is still connected and some data is still pending (like a final clipboard
release from the client), then this data should be written to the guest agent.
---
server/reds.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index 1521bc5..b286809 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1170,12 +1170,12 @@ static int write_to_vdi_port()
int total = 0;
int n;
- if (!reds->agent_state.connected || reds->mig_target) {
+ if (!vdagent || reds->mig_target) {
return 0;
}
sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceCharDeviceInterface, base);
- while (reds->agent_state.connected) {
+ while (vdagent) {
if (!(ring_item = ring_get_tail(&state->write_queue))) {
break;
}
--
1.7.4.2
More information about the Spice-devel
mailing list