On Thu, Jan 29, 2015 at 07:22:59AM -0500, Marc-André Lureau wrote: > Now that connect() actually happens as it should imho, > the two lines could be swapped, that should remove the warning. > > I am a bit worried about the connect_delayed() resetting the coroutine > that might not be finished, it should probably resume it until it ends. Indeed... Looking at the end of spice_channel_coroutine(), we have SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel); /* snip */ g_idle_add(spice_channel_delayed_unref, data); In the SPICE_CHANNEL_STATE_SWITCHING state, channel_disconnect() will call channel_connect which will do c->connect_delayed_id = g_idle_add(connect_delayed, channel); So connect_delayed will be called before spice_channel_delayed_unref, and will reset the coroutine, then _delayed_unref will be called and will trip on g_return_val_if_fail(c->coroutine.coroutine.exited == TRUE, FALSE); One way around it would be to check in connect_delayed if a delayed_unref idle is queued, but that does not sound very nice. Open to any suggestions :) (maybe we should not be in the STATE_SWITCHING state when about to exit the coroutine?) Christophe
Attachment:
pgpfWQdgWsptM.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel