[Spice-devel] [PATCH spice-gtk v2 08/19] migration: improve debug log

Marc-André Lureau marcandre.lureau at redhat.com
Thu Nov 13 15:32:31 PST 2014


---
 gtk/spice-channel.c | 2 ++
 gtk/spice-session.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 3966560..4fbcb18 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2545,6 +2545,7 @@ static void channel_reset(SpiceChannel *channel, gboolean migrating)
 {
     SpiceChannelPrivate *c = channel->priv;
 
+    CHANNEL_DEBUG(channel, "channel reset");
     if (c->connect_delayed_id) {
         g_source_remove(c->connect_delayed_id);
         c->connect_delayed_id = 0;
@@ -2611,6 +2612,7 @@ static void channel_reset(SpiceChannel *channel, gboolean migrating)
 G_GNUC_INTERNAL
 void spice_channel_reset(SpiceChannel *channel, gboolean migrating)
 {
+    CHANNEL_DEBUG(channel, "reset %s", migrating ? "migrating" : "");
     SPICE_CHANNEL_GET_CLASS(channel)->channel_reset(channel, migrating);
 }
 
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 4bb2b9f..c44a3e1 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1463,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;
 
@@ -1522,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



More information about the Spice-devel mailing list