> > From: Victor Toso <me@xxxxxxxxxxxxxx> > > 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@xxxxxxxxxx> Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Frediano > --- > src/channel-main.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > 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); > } _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel