[Spice-devel] [PATCH spice-gtk v2 13/19] migration: don't check socket error

Christophe Fergeau cfergeau at redhat.com
Fri Nov 14 06:25:24 PST 2014


ACK patches 01 to 13

Christophe

On Fri, Nov 14, 2014 at 12:32:36AM +0100, Marc-André Lureau wrote:
> During migration, the original socket is closed before the coroutine
> finishes, so it's not guaranteed that c->sock will still be set when the
> channel is in an error state in spice_channel_iterate().
> ---
>  gtk/spice-channel.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 4fbcb18..115efda 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2140,6 +2140,10 @@ static gboolean spice_channel_iterate(SpiceChannel *channel)
>  
>      if (c->has_error) {
>          GIOCondition ret;
> +
> +        if (!c->sock)
> +            return FALSE;
> +
>          /* We don't want to report an error if the socket was closed gracefully
>           * on the other end (VM shutdown) */
>          ret = g_socket_condition_check(c->sock, G_IO_IN | G_IO_ERR | G_IO_HUP);
> -- 
> 1.9.3
> 
> _______________________________________________
> 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/20141114/926db3f5/attachment.sig>


More information about the Spice-devel mailing list