From 9ea93ab52b021980c148f0033e49c498fb3ec345 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Fri, 13 Mar 2020 18:24:17 +0000 Subject: [PATCH] spicevmc: Check capabilities of the only possible client RedVmcChannel can have only one client so check directly it (the RedChannel version just iterate all clients). Even if the channel would support multiple clients in this case we would need to check only the one we are sending the message to. Signed-off-by: Frediano Ziglio --- server/spicevmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index 6cc51135..729341d8 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -300,7 +300,7 @@ static RedVmcPipeItem* try_compress_lz4(RedVmcChannel *channel, int n, RedVmcPip /* n <= threshold - data will not be compressed */ return NULL; } - if (!red_channel_test_remote_cap(RED_CHANNEL(channel), SPICE_SPICEVMC_CAP_DATA_COMPRESS_LZ4)) { + if (!red_channel_client_test_remote_cap(channel->rcc, SPICE_SPICEVMC_CAP_DATA_COMPRESS_LZ4)) { /* Client doesn't have compression cap - data will not be compressed */ return NULL; }