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

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

 



---
 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)                                                    \
-- 
2.5.0

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