The spice_session_disconnect() method now call 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"); 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"); 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