[spice-server PATCH] display-channel: Don't disconnect when lz4 not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't diconnect client, if lz4 is requested as a preferred compression,
but the server doesn't support it.
---
Sidenote:
Should server disconnect, when unsupported compression is requested?
FE if client sends unknown compression, and this switch goes to default.
Default could always return TRUE, just not set the compression.
---
 server/dcc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/dcc.c b/server/dcc.c
index b2ee7a6..7076d21 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -1351,12 +1351,13 @@ static int dcc_handle_preferred_compression(DisplayChannelClient *dcc,
         SpiceMsgcDisplayPreferredCompression *pc)
 {
     switch (pc->image_compression) {
+    case SPICE_IMAGE_COMPRESSION_LZ4:
+#ifndef USE_LZ4
+        return TRUE;
+#endif
     case SPICE_IMAGE_COMPRESSION_AUTO_LZ:
     case SPICE_IMAGE_COMPRESSION_AUTO_GLZ:
     case SPICE_IMAGE_COMPRESSION_QUIC:
-#ifdef USE_LZ4
-    case SPICE_IMAGE_COMPRESSION_LZ4:
-#endif
     case SPICE_IMAGE_COMPRESSION_LZ:
     case SPICE_IMAGE_COMPRESSION_GLZ:
     case SPICE_IMAGE_COMPRESSION_OFF:
--
2.5.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]