[Spice-devel] [spice-server 8/8] Use red_qxl_check_qxl_version in red-worker

Jonathon Jongsma jjongsma at redhat.com
Thu Mar 17 18:42:13 UTC 2016


On Mon, 2016-03-14 at 18:10 +0100, Christophe Fergeau wrote:
> ---
>  server/red-qxl.h    | 1 +
>  server/red-worker.c | 8 ++++----
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/server/red-qxl.h b/server/red-qxl.h
> index f58d42b..7287740 100644
> --- a/server/red-qxl.h
> +++ b/server/red-qxl.h
> @@ -44,6 +44,7 @@ gboolean red_qxl_get_allow_client_mouse(QXLInstance *qxl,
> gint *x_res, gint *y_r
>  SpiceMsgDisplayGlScanoutUnix *red_qxl_get_gl_scanout(QXLInstance *qxl);
>  void red_qxl_put_gl_scanout(QXLInstance *qxl, SpiceMsgDisplayGlScanoutUnix
> *scanout);
>  void red_qxl_gl_draw_async_complete(QXLInstance *qxl);
> +int red_qxl_check_qxl_version(QXLInstance *qxl, int major, int minor);
>  SpiceServer* red_qxl_get_server(QXLState *qxl);
>  
>  /* Wrappers around QXLInterface vfuncs */
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 3a82aa4..8ca11c7 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -510,10 +510,10 @@ static void guest_set_client_capabilities(RedWorker
> *worker)
>      };
>      QXLInterface *qif = qxl_get_interface(worker->qxl);
>  
> -    if (qif->base.major_version < 3 ||
> -        (qif->base.major_version == 3 &&
> -        qif->base.minor_version < 2) ||
> -        !qif->set_client_capabilities) {
> +    if (!red_qxl_check_qxl_version(worker->qxl, 3, 2)) {
> +        return;
> +    }
> +    if (!qif->set_client_capabilities) {
>          return;
>      }
>  #define SET_CAP(a,c)                                                    \


Assuming the static change gets moved from patch 5 to this patch: ACK

Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


More information about the Spice-devel mailing list