Re: [PATCH 3/3] Display: Send a preferred compression message on init.

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

 



On Fri, Apr 17, 2015 at 12:40:25PM +0200, Javier Celaya wrote:
> If the user prefers a specific compression algorithm, report it when
> setting up the display channel.
> ---
>  gtk/channel-display.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/gtk/channel-display.c b/gtk/channel-display.c
> index efe2259..6f5fb5f 100644
> --- a/gtk/channel-display.c
> +++ b/gtk/channel-display.c
> @@ -789,12 +789,14 @@ static void spice_display_channel_up(SpiceChannel *channel)
>      SpiceMsgOut *out;
>      SpiceSession *s = spice_channel_get_session(channel);
>      SpiceMsgcDisplayInit init;
> +    SpiceMsgcDisplayPreferredCompression pref_comp_msg;
>      int cache_size;
>      int glz_window_size;
>  
>      g_object_get(s,
>                   "cache-size", &cache_size,
>                   "glz-window-size", &glz_window_size,
> +                 "preferred-compression", &pref_comp_msg.image_compression,

SpiceMsgcDisplayPreferredCompression::image_compression is an (u)int8_t,
the "preferred-compression" property is defined as an int property, so
you really need to go through an intermediate int-sized variable as
g_object_get() will assume &pref_comp_msg.image_compression is a pointer
to an int-sized variable.

Christophe

Attachment: pgpHWcaHmgV6U.pgp
Description: PGP signature

_______________________________________________
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]