peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0422-spice-set-spice-uuid-and-name.patch

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