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 <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-03-13 18:24:17 +00:00
parent 948ec8b81b
commit 9ea93ab52b

View File

@ -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;
}