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

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

Details

Message ID 1415921562-6267-9-git-send-email-marcandre.lureau@redhat.com
State Accepted
Commit 259d7c6c3a96cd18c8770684c74c1b88749e8e14
Headers show

Not browsing as part of any series.

Commit Message

marcandre.lureau@redhat.com Nov. 13, 2014, 11:32 p.m.
---
 gtk/spice-channel.c | 2 ++
 gtk/spice-session.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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;