[Spice-devel,spice-gtk,v2,03/19] migration: add "connecting" state

Submitted by marcandre.lureau@redhat.com on Nov. 13, 2014, 11:32 p.m.

Details

Message ID 1415921562-6267-4-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

marcandre.lureau@redhat.com Nov. 13, 2014, 11:32 p.m.
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(+)

Patch hide | download patch | download mbox

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