[Spice-devel] [PATCH spice-gtk 04/13] migration: set session migration during connect
Christophe Fergeau
cfergeau at redhat.com
Wed Nov 12 07:29:08 PST 2014
Hi,
On Sun, Nov 09, 2014 at 05:31:36PM +0100, Marc-André Lureau wrote:
> Track the migration session earlier, so that disconnecting before
> migration finished will abort and release it.
> ---
> gtk/channel-main.c | 2 +-
> gtk/spice-session-priv.h | 1 -
> gtk/spice-session.c | 12 ++++++------
> 3 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index 873487b..7cc7630 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2079,6 +2079,7 @@ static gboolean migrate_connect(gpointer data)
> mig->session = spice_session_new_from_session(session);
> mig->session->priv->migration_copy = true;
> spice_session_set_migration_state(mig->session, SPICE_SESSION_MIGRATION_CONNECTING);
> + session->priv->migration = g_object_ref(mig->session);
>
> if ((c->peer_hdr.major_version == 1) &&
> (c->peer_hdr.minor_version < 1)) {
> @@ -2179,7 +2180,6 @@ static void main_migrate_connect(SpiceChannel *channel,
> reply_type = SPICE_MSGC_MAIN_MIGRATE_CONNECTED;
> }
> spice_session_set_migration(spice_channel_get_session(channel),
> - mig.session,
> mig.do_seamless);
Can you rename spice_session_set_migration() to something different as
this no longer a setter for SpiceSession::migration? ACK with that
changed (though see my comment on patch 9 which could be squashed here).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141112/095dedce/attachment-0001.sig>
More information about the Spice-devel
mailing list