[Spice-devel] [PATCH spice-gtk] main: fix notify of agent disconnection

Christophe Fergeau cfergeau at redhat.com
Thu Oct 10 17:41:50 CEST 2013


On Thu, Oct 10, 2013 at 05:34:28PM +0200, Marc-André Lureau wrote:
> spice_main_channel_reset_agent() reset connected state, and prevent
> notify of property change.

ACK

Christophe

> 
> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131010/77df1f5e/attachment-0001.pgp>


More information about the Spice-devel mailing list