[Spice-devel] [PATCH spice-gtk] channel_base: exit handle_migrate when expecting MIGRATE_DATA and receiving something else
Hans de Goede
hdegoede at redhat.com
Mon Apr 8 14:28:22 PDT 2013
ACK.
On 04/08/2013 10:34 PM, Yonit Halperin wrote:
> Previously, when an error occurred on the src server side, and we
> received other message than MIGRATE_DATA, this messages was forwarded
> to the dest server, and made it crash.
> ---
> gtk/channel-base.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gtk/channel-base.c b/gtk/channel-base.c
> index a7e9580..dff3024 100644
> --- a/gtk/channel-base.c
> +++ b/gtk/channel-base.c
> @@ -168,11 +168,13 @@ void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in)
> if (mig->flags & SPICE_MIGRATE_NEED_DATA_TRANSFER) {
> spice_channel_recv_msg(channel, get_msg_handler, &data);
> if (!data) {
> - g_warning("expected SPICE_MSG_MIGRATE_DATA, got empty message");
> + g_critical("expected SPICE_MSG_MIGRATE_DATA, got empty message");
> + return;
> } else if (spice_header_get_msg_type(data->header, c->use_mini_header) !=
> SPICE_MSG_MIGRATE_DATA) {
> - g_warning("expected SPICE_MSG_MIGRATE_DATA, got %d",
> + g_critical("expected SPICE_MSG_MIGRATE_DATA, got %d",
> spice_header_get_msg_type(data->header, c->use_mini_header));
> + return;
> }
> }
>
>
More information about the Spice-devel
mailing list