]> git.proxmox.com Git - qemu.git/commitdiff
spice: set spice uuid and name
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Mon, 5 Mar 2012 17:22:26 +0000 (18:22 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 19 Mar 2012 12:12:19 +0000 (13:12 +0100)
This allows a Spice client to identify a VM

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/spice-core.c

index c1091e1602a8a96332f7bba4ee82755292a0a60a..80535b6e0778cd2761282cff46e7b8319a4e6df6 100644 (file)
@@ -19,6 +19,7 @@
 #include <spice-experimental.h>
 
 #include <netdb.h>
+#include "sysemu.h"
 
 #include "qemu-common.h"
 #include "qemu-spice.h"
@@ -688,6 +689,11 @@ void qemu_spice_init(void)
 
     qemu_opt_foreach(opts, add_channel, &tls_port, 0);
 
+#if SPICE_SERVER_VERSION >= 0x000a02 /* 0.10.2 */
+    spice_server_set_name(spice_server, qemu_name);
+    spice_server_set_uuid(spice_server, qemu_uuid);
+#endif
+
     if (0 != spice_server_init(spice_server, &core_interface)) {
         error_report("failed to initialize spice server");
         exit(1);