[Spice-commits] server/spicevmc.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 3 07:42:07 UTC 2020


 server/spicevmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9ea93ab52b021980c148f0033e49c498fb3ec345
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Mar 13 18:24:17 2020 +0000

    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 at redhat.com>

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


More information about the Spice-commits mailing list