[Spice-devel] [PATCH] Check client is using unix sockets in dcc_gl_draw_item_new

Christophe Fergeau cfergeau at redhat.com
Tue Sep 27 09:31:12 UTC 2016


Isn't this already tested somewhere else before reaching this place? Not
really opposed to the patch, but knowing how this can be hit would
probably be useful.

Christophe

On Tue, Sep 27, 2016 at 09:44:16AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/dcc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index a5a1b40..3d3ac8e 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -593,7 +593,8 @@ RedPipeItem *dcc_gl_draw_item_new(RedChannelClient *rcc, void *data, int num)
>      const SpiceMsgDisplayGlDraw *draw = data;
>      RedGlDrawItem *item;
>  
> -    if (!red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_GL_SCANOUT)) {
> +    if (!reds_stream_is_plain_unix(red_channel_client_get_stream(rcc)) ||
> +        !red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_GL_SCANOUT)) {
>          spice_printerr("FIXME: client does not support GL scanout");
>          red_channel_client_disconnect(rcc);
>          return NULL;
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160927/88d961f8/attachment.sig>


More information about the Spice-devel mailing list