Re: [PATCH spice-gtk 04/13] migration: set session migration during connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 12, 2014 at 10:53:16AM -0500, Marc-André Lureau wrote:
> 
> 
> ----- Original Message -----
> > 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).
> 
> It's hard to come up with a better name.
> 
> The function is used for seamless and non-seamless migration.
> 
> It moves to "migrating" state (connected channels on target now migrate to source session), source session is switch to target server.
> 
> What about spice_session_start_migrating() ?

What I was about to suggest spice_session_start_migration, so ACK to
your spice_session_start_migrating.

Christophe

Attachment: pgp0spuqlIL8p.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]