1ffd272
From a149ead57ceb131ff2e859549e835c8499c6ba47 Mon Sep 17 00:00:00 2001
56753ff
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
56753ff
Date: Mon, 5 Mar 2012 18:22:26 +0100
1ffd272
Subject: [PATCH] spice: set spice uuid and name
56753ff
56753ff
This allows a Spice client to identify a VM
56753ff
56753ff
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
56753ff
---
1ffd272
 ui/spice-core.c | 6 ++++++
56753ff
 1 file changed, 6 insertions(+)
56753ff
56753ff
diff --git a/ui/spice-core.c b/ui/spice-core.c
56753ff
index 98356b0..4ad0a67 100644
56753ff
--- a/ui/spice-core.c
56753ff
+++ b/ui/spice-core.c
56753ff
@@ -19,6 +19,7 @@
56753ff
 #include <spice-experimental.h>
56753ff
 
56753ff
 #include <netdb.h>
56753ff
+#include "sysemu.h"
56753ff
 
56753ff
 #include "qemu-common.h"
56753ff
 #include "qemu-spice.h"
56753ff
@@ -688,6 +689,11 @@ void qemu_spice_init(void)
56753ff
 
56753ff
     qemu_opt_foreach(opts, add_channel, &tls_port, 0);
56753ff
 
56753ff
+#if SPICE_SERVER_VERSION >= 0x000a02 /* 0.10.2 */
56753ff
+    spice_server_set_name(spice_server, qemu_name);
56753ff
+    spice_server_set_uuid(spice_server, qemu_uuid);
56753ff
+#endif
56753ff
+
56753ff
     if (0 != spice_server_init(spice_server, &core_interface)) {
56753ff
         error_report("failed to initialize spice server");
56753ff
         exit(1);