Re: [PATCHv2] LZ4: warn if trying to set lz4 but not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK.

Christophe

On Mon, Jan 26, 2015 at 09:12:11AM +0100, Javier Celaya wrote:
> ---
>  server/reds.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/server/reds.c b/server/reds.c
> index e34433b..2bdc557 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3501,6 +3501,14 @@ SPICE_GNUC_VISIBLE int spice_server_set_image_compression(SpiceServer *s,
>                                                            spice_image_compression_t comp)
>  {
>      spice_assert(reds == s);
> +#ifndef USE_LZ4
> +    if (comp == SPICE_IMAGE_COMPRESS_LZ4) {
> +        spice_warning("LZ4 compression not supported, falling back to auto GLZ");
> +        comp = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
> +        set_image_compression(comp);
> +        return -1;
> +    }
> +#endif
>      set_image_compression(comp);
>      return 0;
>  }
> -- 
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpOFUwTqu7y2.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]