[Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request

Christophe Fergeau cfergeau at redhat.com
Thu Nov 13 01:07:45 PST 2014


On Wed, Nov 12, 2014 at 06:49:50PM +0100, Marc-André Lureau wrote:
> On Wed, Nov 12, 2014 at 6:35 PM, Christophe Fergeau <cfergeau at redhat.com>
> wrote:
> 
> > 'git grep spice_channel_disconnect' gives:
> > doc/reference/spice-gtk-sections.txt:spice_channel_disconnect
> > gtk/channel-main.c:    spice_channel_disconnect(channel,
> > SPICE_CHANNEL_SWITCHING);
> > gtk/map-file:spice_channel_disconnect;
> > gtk/spice-channel.c:    spice_channel_disconnect(channel,
> > SPICE_CHANNEL_CLOSED);
> > gtk/spice-channel.c:    spice_channel_disconnect(channel,
> > SPICE_CHANNEL_NONE);
> > gtk/spice-channel.c: * spice_channel_disconnect:
> > gtk/spice-channel.c:void spice_channel_disconnect(SpiceChannel *channel,
> > SpiceChannelEvent reason)
> > gtk/spice-channel.h:void spice_channel_disconnect(SpiceChannel *channel,
> > SpiceChannelEvent reason);
> > gtk/spice-glib-sym-file:spice_channel_disconnect
> > gtk/spicy.c:    spice_channel_disconnect(channel, SPICE_CHANNEL_CLOSED);
> >
> > so the 'reason' argument to spice_channel_disconnect() will never
> > indicate an error.
> >
> 
> I think the code path you want to get triggered is the 'c->has_error =
> > TRUE' part of
> > spice_channel_disconnect() (which is not called when c->state is
> > SPICE_CHANNEL_STATE_UNCONNECTED).
> > Once 'has_error' is set to TRUE, this will trigger the emission of an
> > error in spice_channel_iterate()
> >
> 
> 
> Any reason other than SPICE_CHANNEL_OPENED is enough to abort the migration
> (migrate_channel_event_cb).

Ah, this is the bit I was missing thanks! The commit log needs to be
much more detailed and accurate, and mention explicitly the various code
paths involved to trigger the error, where the looping occurs, ...

Christophe
-------------- 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/20141113/dde0d429/attachment.sig>


More information about the Spice-devel mailing list