[Spice-commits] src/channel-main.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 30 08:16:12 UTC 2019


 src/channel-main.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit ee35577c7e57d032e8c91ace809c48ca0a081e93
Author: Victor Toso <me at victortoso.com>
Date:   Thu Sep 26 15:47:27 2019 +0200

    channel-main: add debug related to migration
    
    Migration can start with different messages and the code could take
    different paths. By having a debug on which message started can help
    pinpoint issues faster.
    
    Signed-off-by: Victor Toso <victortoso at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-main.c b/src/channel-main.c
index 334be7d..4305dcd 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -2394,6 +2394,8 @@ static void main_handle_migrate_begin(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgMainMigrationBegin *msg = spice_msg_in_parsed(in);
 
+    CHANNEL_DEBUG(channel, "migration message: migrate-begin");
+
     main_migrate_connect(channel, &msg->dst_info, false, 0);
 }
 
@@ -2402,6 +2404,8 @@ static void main_handle_migrate_begin_seamless(SpiceChannel *channel, SpiceMsgIn
 {
     SpiceMsgMainMigrateBeginSeamless *msg = spice_msg_in_parsed(in);
 
+    CHANNEL_DEBUG(channel, "migration message: migrate-begin-seamless");
+
     main_migrate_connect(channel, &msg->dst_info, true, msg->src_mig_version);
 }
 
@@ -2410,6 +2414,8 @@ static void main_handle_migrate_dst_seamless_ack(SpiceChannel *channel, SpiceMsg
     SpiceChannelPrivate  *c = SPICE_CHANNEL(channel)->priv;
     SpiceMainChannelPrivate *main_priv = SPICE_MAIN_CHANNEL(channel)->priv;
 
+    CHANNEL_DEBUG(channel, "migration message: migrate-dst-seamless-ack");
+
     g_return_if_fail(c->state == SPICE_CHANNEL_STATE_MIGRATION_HANDSHAKE);
     main_priv->migrate_data->do_seamless = true;
     g_idle_add(main_migrate_handshake_done, main_priv->migrate_data);
@@ -2420,6 +2426,8 @@ static void main_handle_migrate_dst_seamless_nack(SpiceChannel *channel, SpiceMs
     SpiceChannelPrivate  *c = SPICE_CHANNEL(channel)->priv;
     SpiceMainChannelPrivate *main_priv = SPICE_MAIN_CHANNEL(channel)->priv;
 
+    CHANNEL_DEBUG(channel, "migration message: migrate-dst-seamless-nack");
+
     g_return_if_fail(c->state == SPICE_CHANNEL_STATE_MIGRATION_HANDSHAKE);
     main_priv->migrate_data->do_seamless = false;
     g_idle_add(main_migrate_handshake_done, main_priv->migrate_data);
@@ -2444,7 +2452,7 @@ static void main_handle_migrate_end(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
-    SPICE_DEBUG("migrate end");
+    CHANNEL_DEBUG(channel, "migration message: migrate-end");
 
     g_return_if_fail(c->migrate_delayed_id == 0);
     g_return_if_fail(spice_channel_test_capability(channel, SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE));
@@ -2479,6 +2487,8 @@ static void main_handle_migrate_switch_host(SpiceChannel *channel, SpiceMsgIn *i
     char *subject = NULL;
     SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
+    CHANNEL_DEBUG(channel, "migration message: migrate-switch-host");
+
     g_return_if_fail(host[mig->host_size - 1] == '\0');
 
     if (mig->cert_subject_size) {
@@ -2513,7 +2523,8 @@ static void main_handle_migrate_cancel(SpiceChannel *channel,
 {
     SpiceSession *session;
 
-    SPICE_DEBUG("migrate_cancel");
+    CHANNEL_DEBUG(channel, "migration message: migrate-cancel");
+
     session = spice_channel_get_session(channel);
     spice_session_abort_migration(session);
 }


More information about the Spice-commits mailing list