spice_main_channel_reset_agent() reset connected state, and prevent
notify of property change.

This is a minor regression introduced in c3adb24425.
---
 gtk/channel-main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index b342e97..699cff3 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -375,6 +375,9 @@ static void spice_main_channel_reset(SpiceChannel *channel, 
gboolean migrating)
     agent_free_msg_queue(SPICE_MAIN_CHANNEL(channel));
     c->agent_msg_queue = g_queue_new();
 
+    /* check: if agent_connected can be TRUE, it should call instead
+       set_agent_connected() to notify new state */
+    g_warn_if_fail(c->agent_connected == FALSE);
     spice_main_channel_reset_agent(SPICE_MAIN_CHANNEL(channel));
 
     
SPICE_CHANNEL_CLASS(spice_main_channel_parent_class)->channel_reset(channel, 
migrating);
@@ -1399,8 +1402,8 @@ static void agent_start(SpiceMainChannel *channel)
 /* coroutine context  */
 static void agent_stopped(SpiceMainChannel *channel)
 {
-    spice_main_channel_reset_agent(channel);
     set_agent_connected(channel, FALSE); /* For notify */
+    spice_main_channel_reset_agent(channel);
     emit_main_context(channel, SPICE_MAIN_AGENT_UPDATE);
 }
 
-- 
1.8.3.1

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to