Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red-worker.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.c index e55a939..7c7eafe 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -956,9 +956,9 @@ static void handle_dev_set_compression(void *opaque, void *payload) { RedWorkerMessageSetCompression *msg = payload; RedWorker *worker = opaque; + SpiceImageCompression image_compression = msg->image_compression; - worker->image_compression = msg->image_compression; - switch (worker->image_compression) { + switch (image_compression) { case SPICE_IMAGE_COMPRESSION_AUTO_LZ: spice_info("ic auto_lz"); break; @@ -984,7 +984,9 @@ static void handle_dev_set_compression(void *opaque, void *payload) break; default: spice_warning("ic invalid"); + image_compression = worker->image_compression; } + worker->image_compression = image_compression; display_channel_compress_stats_print(worker->display_channel); display_channel_compress_stats_reset(worker->display_channel); -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel