Re: [PATCH spice-server v3 2/5] red-channel-client: Make capabilities property write only

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

 



On Thu, Mar 02, 2017 at 09:16:08AM +0000, Frediano Ziglio wrote:
> These properties are not read and code is broken (you would get
> uninitialized values).

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

(maybe the more specific "the content of the array would be uninitialized"
rather than "you would get uninitialized values").



> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-channel-client.c | 20 ++------------------
>  1 file changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/server/red-channel-client.c b/server/red-channel-client.c
> index b583da2..2d2e3fd 100644
> --- a/server/red-channel-client.c
> +++ b/server/red-channel-client.c
> @@ -286,22 +286,6 @@ red_channel_client_get_property(GObject *object,
>          case PROP_MONITOR_LATENCY:
>              g_value_set_boolean(value, self->priv->monitor_latency);
>              break;
> -        case PROP_COMMON_CAPS:
> -            {
> -                GArray *arr = g_array_sized_new(FALSE, FALSE,
> -                                                sizeof(*self->priv->remote_caps.common_caps),
> -                                                self->priv->remote_caps.num_common_caps);
> -                g_value_take_boxed(value, arr);
> -            }
> -            break;
> -        case PROP_CAPS:
> -            {
> -                GArray *arr = g_array_sized_new(FALSE, FALSE,
> -                                                sizeof(*self->priv->remote_caps.caps),
> -                                                self->priv->remote_caps.num_caps);
> -                g_value_take_boxed(value, arr);
> -            }
> -            break;
>          default:
>              G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
>      }
> @@ -454,7 +438,7 @@ static void red_channel_client_class_init(RedChannelClientClass *klass)
>                                "Common Capabilities",
>                                G_TYPE_ARRAY,
>                                G_PARAM_STATIC_STRINGS
> -                              | G_PARAM_READWRITE
> +                              | G_PARAM_WRITABLE
>                                | G_PARAM_CONSTRUCT_ONLY);
>      g_object_class_install_property(object_class, PROP_COMMON_CAPS, spec);
>  
> @@ -462,7 +446,7 @@ static void red_channel_client_class_init(RedChannelClientClass *klass)
>                                "Capabilities",
>                                G_TYPE_ARRAY,
>                                G_PARAM_STATIC_STRINGS
> -                              | G_PARAM_READWRITE
> +                              | G_PARAM_WRITABLE
>                                | G_PARAM_CONSTRUCT_ONLY);
>      g_object_class_install_property(object_class, PROP_CAPS, spec);
>  }
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]