[Spice-devel] [PATCH spice-gtk 03/13] migration: add connection state

Marc-André Lureau marcandre.lureau at redhat.com
Sun Nov 9 08:31:35 PST 2014


Add a new migration state to track early migration step, when migration
session is connecting to destination
---
 gtk/channel-main.c  | 1 +
 gtk/spice-session.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 62e8905..873487b 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -2078,6 +2078,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);
 
     if ((c->peer_hdr.major_version == 1) &&
         (c->peer_hdr.minor_version < 1)) {
diff --git a/gtk/spice-session.h b/gtk/spice-session.h
index 665c609..4043a64 100644
--- a/gtk/spice-session.h
+++ b/gtk/spice-session.h
@@ -52,6 +52,7 @@ typedef enum {
  * @SPICE_SESSION_MIGRATION_NONE: no migration going on
  * @SPICE_SESSION_MIGRATION_SWITCHING: the session is switching host (destroy and reconnect)
  * @SPICE_SESSION_MIGRATION_MIGRATING: the session is migrating seamlessly (reconnect)
+ * @SPICE_SESSION_MIGRATION_CONNECTING: the migration is connecting to destination
  *
  * Session migration state.
  **/
@@ -59,6 +60,7 @@ typedef enum {
     SPICE_SESSION_MIGRATION_NONE,
     SPICE_SESSION_MIGRATION_SWITCHING,
     SPICE_SESSION_MIGRATION_MIGRATING,
+    SPICE_SESSION_MIGRATION_CONNECTING,
 } SpiceSessionMigration;
 
 struct _SpiceSession
-- 
1.9.3



More information about the Spice-devel mailing list