diff options
author | Javier Celaya <javier.celaya@flexvm.es> | 2015-01-26 09:12:11 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-06-11 16:45:52 +0200 |
commit | 7a081a7ced8e81eb06698e9fa2f32d35717b5f33 (patch) | |
tree | 7c48c2b74bcde6950f49e53e7b8c9a160ad4dfd1 /server/reds.c | |
parent | 0feb705cbfb22182f473c9527e68e1fa394b41c2 (diff) |
LZ4: warn if trying to set lz4 but not supported
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/reds.c b/server/reds.c index 6d70b681..3a38258c 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3553,6 +3553,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; } |