On Fri, Nov 21, 2014 at 02:13:20PM +0100, Marc-André Lureau wrote: > Fundamentally, it doesn't change much from my patch, I guess removing > g_clear_object(channel->priv->session) and ignoring the case where the > channel isn't in the session (like you do here) would have been the > same. Yup, that's very likely, it was easier for me to restart from scratch (after learning from your patches) than to try to modify your patches, but they probably don't need to be much different indeed. > > I still think it's a better idea to clear the channel->session if the > channel has been disconnect from the session, although I agree that it > requires a bit more testing and fixing for some warnings/criticals. Well, clearing the session would indeed be cleaner, but it has its share of issues with existing code. Ideally it would be possible not to set the session to NULL for now, and warn when something tries to use the session after it has been disconnected. This would allow to fix the various issues that show up without risking a crash on a NULL session, but I don't really see how to achieve that except by adding some test+g_warning to all function acting on a session. Christophe
Attachment:
pgpJtyjkUIxwy.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel