2018-02-19 12:38:54 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2017-04-05 11:49:19 +03:00
|
|
|
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
|
|
|
Date: Wed, 9 Dec 2015 14:32:11 +0100
|
2018-08-30 16:00:07 +03:00
|
|
|
Subject: [PATCH] PVE: qapi: modify spice query
|
2017-04-05 11:49:19 +03:00
|
|
|
|
|
|
|
Provide the last ticket in the SpiceInfo struct optionally.
|
|
|
|
---
|
2018-02-22 14:34:57 +03:00
|
|
|
qapi/ui.json | 3 +++
|
|
|
|
ui/spice-core.c | 5 +++++
|
2017-04-05 11:49:19 +03:00
|
|
|
2 files changed, 8 insertions(+)
|
|
|
|
|
2018-02-22 14:34:57 +03:00
|
|
|
diff --git a/qapi/ui.json b/qapi/ui.json
|
2018-08-30 16:00:07 +03:00
|
|
|
index 4ca91bb45a..636256dacc 100644
|
2018-02-22 14:34:57 +03:00
|
|
|
--- a/qapi/ui.json
|
|
|
|
+++ b/qapi/ui.json
|
2018-08-30 16:00:07 +03:00
|
|
|
@@ -211,11 +211,14 @@
|
2017-04-05 11:49:19 +03:00
|
|
|
#
|
|
|
|
# @channels: a list of @SpiceChannel for each active spice channel
|
|
|
|
#
|
2017-04-05 12:38:26 +03:00
|
|
|
+# @ticket: The last ticket set with set_password
|
2017-04-05 11:49:19 +03:00
|
|
|
+#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'SpiceInfo',
|
|
|
|
'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
|
|
|
|
'*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
|
|
|
|
+ '*ticket': 'str',
|
2018-08-30 16:00:07 +03:00
|
|
|
'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
|
|
|
|
'if': 'defined(CONFIG_SPICE)' }
|
2017-04-05 11:49:19 +03:00
|
|
|
|
|
|
|
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
2018-08-30 16:00:07 +03:00
|
|
|
index d327533c8f..74bd443462 100644
|
2017-04-05 11:49:19 +03:00
|
|
|
--- a/ui/spice-core.c
|
|
|
|
+++ b/ui/spice-core.c
|
2018-08-30 16:00:07 +03:00
|
|
|
@@ -539,6 +539,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
|
2017-04-05 11:49:19 +03:00
|
|
|
micro = SPICE_SERVER_VERSION & 0xff;
|
|
|
|
info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
|
|
|
|
|
|
|
|
+ if (auth_passwd) {
|
|
|
|
+ info->has_ticket = true;
|
|
|
|
+ info->ticket = g_strdup(auth_passwd);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
if (port) {
|
|
|
|
info->has_port = true;
|
|
|
|
info->port = port;
|
|
|
|
--
|
2017-04-05 12:51:17 +03:00
|
|
|
2.11.0
|
2017-04-05 11:49:19 +03:00
|
|
|
|