[Spice-devel] [PATCH spice-gtk 3/9] channel: reset connection state on error

Christophe Fergeau cfergeau at redhat.com
Mon Jan 26 09:29:49 PST 2015


On Tue, Jan 13, 2015 at 05:38:22PM +0100, Marc-André Lureau wrote:
> Fix regression introduced in 6b475802, to permit reconnection on error,
> the channel state must be < STATE_CONNECTING. Since the error is
> reported after coroutine exits and channel is reset, the state can be
> modified before throwing the error now.


ACK.

> ---
>  gtk/spice-channel.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 7c7cbe1..eb97e78 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2242,6 +2242,7 @@ static gboolean spice_channel_delayed_unref(gpointer data)
>      g_return_val_if_fail(c->coroutine.coroutine.exited == TRUE, FALSE);
>  
>      if (c->event != SPICE_CHANNEL_NONE) {
> +        c->state = SPICE_CHANNEL_STATE_UNCONNECTED;
>          g_coroutine_signal_emit(channel, signals[SPICE_CHANNEL_EVENT], 0, c->event);
>          c->event = SPICE_CHANNEL_NONE;
>          g_clear_error(&c->error);
> -- 
> 2.1.0
> 
> _______________________________________________
> 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: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150126/b2d2caaa/attachment.sig>


More information about the Spice-devel mailing list