summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-08 11:01:36 +0100
committerHans de Goede <hdegoede@redhat.com>2013-04-09 13:12:06 +0200
commitc3adb244259552b6cd528ab901e4d2334ca5b940 (patch)
tree814f355e712735f72439dd52bc3337f333e7a96f
parent081e41a21359ae9b73a33a067a830775d2d7d3b8 (diff)
channel-main: Reset agent message receive state on agent stop
Discard any partially received messages from the agent on agent stop. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--gtk/channel-main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 672fbcf..8e8a3a5 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1362,11 +1362,8 @@ static void agent_start(SpiceMainChannel *channel)
/* coroutine context */
static void agent_stopped(SpiceMainChannel *channel)
{
- SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
-
- set_agent_connected(channel, FALSE);
- c->agent_caps_received = false;
- c->agent_display_config_sent = false;
+ spice_main_channel_reset_agent(channel);
+ set_agent_connected(channel, FALSE); /* For notify */
emit_main_context(channel, SPICE_MAIN_AGENT_UPDATE);
}