summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-04-01 14:08:56 +0200
committerHans de Goede <hdegoede@redhat.com>2011-04-01 14:08:56 +0200
commitadd4bedb2fcc2a3f956f2a2a11785fda80902735 (patch)
tree3174ca77aaf7afb738162fc428a1c8efc46484f5
parenta19f51265c04bfa33eaa07f499eda35a55844a8b (diff)
downloadspice-add4bedb2fcc2a3f956f2a2a11785fda80902735.tar.gz
spice-add4bedb2fcc2a3f956f2a2a11785fda80902735.tar.xz
spice-add4bedb2fcc2a3f956f2a2a11785fda80902735.zip
server: reset read/write filter on agent/client disconnect
The agent message filter keeps track of messages as they are being send reset the relevant filter to its initial state when one of the 2 ends of the agent<->client "tunnel" disconnects.
-rw-r--r--server/reds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/reds.c b/server/reds.c
index 088683b6..3c7077aa 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -713,6 +713,7 @@ static void reds_reset_vdp()
ring_add(&state->read_bufs, &state->current_read_buf->link);
state->current_read_buf = NULL;
}
+ agent_msg_filter_init(&state->read_filter, agent_copypaste);
state->client_agent_started = FALSE;
}
@@ -743,6 +744,7 @@ static void reds_disconnect()
red_printf("");
reds->disconnecting = TRUE;
reds_reset_outgoing();
+ agent_msg_filter_init(&reds->agent_state.write_filter, agent_copypaste);
if (reds->agent_state.connected) {
SpiceCharDeviceInterface *sif;