On Wed, Nov 12, 2014 at 6:35 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> 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()
--
Marc-André Lureau
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel