From: Frediano Ziglio <fziglio@xxxxxxxxxx> Send uncompressed instead. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/spicevmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index dce0dc6..d7ef5ba 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -144,7 +144,7 @@ static RedVmcPipeItem* try_compress_lz4(SpiceVmcState *state, int n, RedVmcPipeI n, BUF_SIZE); - if (compressed_data_count > 0) { + if (compressed_data_count > 0 && compressed_data_count < n) { msg_item_compressed->type = SPICE_DATA_COMPRESSION_TYPE_LZ4; msg_item_compressed->uncompressed_data_size = n; msg_item_compressed->buf_used = compressed_data_count; @@ -152,8 +152,7 @@ static RedVmcPipeItem* try_compress_lz4(SpiceVmcState *state, int n, RedVmcPipeI return msg_item_compressed; } - /* LZ4 compression failed-fallback a non-compressed data is to be sent */ - spice_warning("Compress Error"); + /* LZ4 compression failed or did non compress, fallback a non-compressed data is to be sent */ free(msg_item_compressed); return NULL; } -- 2.5.5 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel