On Sun, Nov 09, 2014 at 05:31:39PM +0100, Marc-André Lureau wrote: > The spice_session_disconnect() method now call 'now calls' I think > spice_session_abort_migration(), so it is not necessary to do migration > cleanups in dispose anymore > --- > gtk/spice-session.c | 27 +++++++++++---------------- > 1 file changed, 11 insertions(+), 16 deletions(-) > > diff --git a/gtk/spice-session.c b/gtk/spice-session.c > index 39b5c85..6cbd2b6 100644 > --- a/gtk/spice-session.c > +++ b/gtk/spice-session.c > @@ -180,21 +180,9 @@ spice_session_dispose(GObject *gobject) > > spice_session_disconnect(session); > > - if (s->migration) { > - spice_session_disconnect(s->migration); > - g_object_unref(s->migration); > - s->migration = NULL; > - } > - > - if (s->migration_left) { > - g_list_free(s->migration_left); > - s->migration_left = NULL; > - } > - > - if (s->after_main_init) { > - g_source_remove(s->after_main_init); > - s->after_main_init = 0; > - } > + g_warn_if_fail(s->migration == NULL); > + g_warn_if_fail(s->migration_left == NULL); > + g_warn_if_fail(s->after_main_init == 0); > > g_clear_object(&s->audio_manager); > g_clear_object(&s->desktop_integration); > @@ -1475,6 +1463,7 @@ void spice_session_abort_migration(SpiceSession *session) > return; > } > > + SPICE_DEBUG("migration: abort"); This does not really belong to this commit > if (s->migration_state != SPICE_SESSION_MIGRATION_MIGRATING) > goto end; > > @@ -1500,6 +1489,12 @@ end: > g_object_unref(s->migration); > s->migration = NULL; > > + s->migrate_wait_init = FALSE; > + if (s->after_main_init) { > + g_source_remove(s->after_main_init); > + s->after_main_init = 0; > + } > + > spice_session_set_migration_state(session, SPICE_SESSION_MIGRATION_NONE); > } > > @@ -1528,7 +1523,7 @@ void spice_session_channel_migrate(SpiceSession *session, SpiceChannel *channel) > s->migration_left = g_list_remove(s->migration_left, channel); > > if (g_list_length(s->migration_left) == 0) { > - CHANNEL_DEBUG(channel, "all channel migrated"); > + CHANNEL_DEBUG(channel, "migration: all channel migrated, success"); This does not belong here ACK with these bits fixed. > spice_session_disconnect(s->migration); > g_object_unref(s->migration); > s->migration = NULL; > -- > 1.9.3 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
pgpAYVruEAY1W.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel