Re: [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

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

 



On Wed, Mar 23, 2016 at 01:06:26PM +0000, Frediano Ziglio wrote:
> All other messages (even empty ones) have a structure defined.

This is purely for consistency? Or was this causing issues?

> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-qxl.c    | 3 ++-
>  server/red-qxl.h    | 3 +++
>  server/red-worker.c | 2 +-
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/server/red-qxl.c b/server/red-qxl.c
> index 7ef9fe1..4c1c3e6 100644
> --- a/server/red-qxl.c
> +++ b/server/red-qxl.c
> @@ -853,6 +853,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
>                            uint32_t stride, uint32_t format,
>                            int y_0_top)
>  {
> +    RedWorkerMessageGlScanout payload;
>      spice_return_if_fail(qxl != NULL);
>  
>      QXLState *qxl_state = qxl->st;
> @@ -877,7 +878,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
>  
>      /* FIXME: find a way to coallesce all pending SCANOUTs */
>      dispatcher_send_message(&qxl_state->dispatcher,
> -                            RED_WORKER_MESSAGE_GL_SCANOUT, NULL);
> +                            RED_WORKER_MESSAGE_GL_SCANOUT, &payload);

I'd set payload to 0 with
RedWorkerMessageGlScanout payload = { 0, };
or something like that if that's possible. Or add a comment that payload
is a dummy empty struct. Otherwise it looks like we are sending
uninitialized data.

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Christophe

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]