aboutsummaryrefslogtreecommitdiff
path: root/ui/vdagent.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-10-06 14:18:09 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-12-21 10:50:21 +0400
commitddece4657627026a4c853faa8f37029097144e73 (patch)
treef273d5bc4e3151381d4f54a3eced88eecf6a72a6 /ui/vdagent.c
parent2bf40d0841b942e7ba12953d515e62a436f0af84 (diff)
ui/vdagent: add CHECK_SPICE_PROTOCOL_VERSION
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/vdagent.c')
-rw-r--r--ui/vdagent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/vdagent.c b/ui/vdagent.c
index 19e8fbfc96..1f8fc77ee8 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -17,6 +17,14 @@
#include "spice/vd_agent.h"
+#define CHECK_SPICE_PROTOCOL_VERSION(major, minor, micro) \
+ (CONFIG_SPICE_PROTOCOL_MAJOR > (major) || \
+ (CONFIG_SPICE_PROTOCOL_MAJOR == (major) && \
+ CONFIG_SPICE_PROTOCOL_MINOR > (minor)) || \
+ (CONFIG_SPICE_PROTOCOL_MAJOR == (major) && \
+ CONFIG_SPICE_PROTOCOL_MINOR == (minor) && \
+ CONFIG_SPICE_PROTOCOL_MICRO >= (micro)))
+
#define VDAGENT_BUFFER_LIMIT (1 * MiB)
#define VDAGENT_MOUSE_DEFAULT true
#define VDAGENT_CLIPBOARD_DEFAULT false