[Spice-devel] [spice-server PATCH] display-channel: Don't disconnect when lz4 not supported
Pavel Grunt
pgrunt at redhat.com
Wed Dec 16 06:01:35 PST 2015
Hi Lukas,
is the client disconnected?
On Wed, 2015-12-16 at 14:48 +0100, Lukas Venhoda wrote:
> Don't diconnect client, if lz4 is requested as a preferred
typo ^
> compression,
> but the server doesn't support it.
Please add the reference to the bug
> ---
> 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.
I agree with you, in this case (it is just a preferred compression) it
make sense to return TRUE.
Pavel
> ---
> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list