[Spice-devel] [PATCH spice-gtk 06/13] migration: set connecting state before fd request
Marc-André Lureau
marcandre.lureau at gmail.com
Wed Nov 12 09:49:50 PST 2014
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).
--
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141112/76c0a45f/attachment.html>
More information about the Spice-devel
mailing list