[Spice-devel] [PATCH] server: bitmap_consistent: replace spice_error with spice_warning

Uri Lublin uril at redhat.com
Mon Sep 2 01:59:37 PDT 2013


On 09/02/2013 11:11 AM, Christophe Fergeau wrote:
> On Sun, Sep 01, 2013 at 09:43:17PM +0300, Uri Lublin wrote:
>> bitmap_consistent should return true or false.
>> Currently it aborts instead of returning false, due to spice_error.
>> Replacing spice_error with spice_warning, provides information and returns
>> false, as expected.
> Looking for spice_error through that file, it looks like all spice_error
> occurrences should be spice_warning:

Ack.

>
> diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
> index 6c0b065..cc19795 100644
> --- a/server/red_parse_qxl.c
> +++ b/server/red_parse_qxl.c
> @@ -486,7 +486,8 @@ static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
>           red_put_data_chunks(&chunks);
>           break;
>       default:
> -        spice_error("unknown type %d", red->descriptor.type);
> +        spice_warning("unknown type %d", red->descriptor.type);
> +        goto error;
>       }
>       return red;
>   error:
> @@ -1001,7 +1002,7 @@ static int red_get_native_drawable(RedMemSlotInfo *slots, int group_id,
>                                 &red->u.whiteness, &qxl->u.whiteness, flags);
>           break;
>       default:
> -        spice_error("unknown type %d", red->type);
> +        spice_warning("unknown type %d", red->type);
>           error = 1;
>           break;
>       };
> @@ -1087,7 +1088,7 @@ static int red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
>                                 &red->u.whiteness, &qxl->u.whiteness, flags);
>           break;
>       default:
> -        spice_error("unknown type %d", red->type);
> +        spice_warning("unknown type %d", red->type);
>           error = 1;
>           break;
>       };
>
> Christophe



More information about the Spice-devel mailing list