1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Mon, 6 Apr 2020 12:16:45 +0200
4 Subject: [PATCH] PVE: qapi: modify spice query
6 Provide the last ticket in the SpiceInfo struct optionally.
8 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 [FE: adapt to QAPI change]
10 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
13 ui/spice-core.c | 4 ++++
14 2 files changed, 7 insertions(+)
16 diff --git a/qapi/ui.json b/qapi/ui.json
17 index 006616aa77..dfd1d3e36b 100644
22 # @channels: a list of @SpiceChannel for each active spice channel
24 +# @ticket: The last ticket set with set_password
28 { 'struct': 'SpiceInfo',
29 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
30 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
32 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
33 'if': 'CONFIG_SPICE' }
35 diff --git a/ui/spice-core.c b/ui/spice-core.c
36 index b20c25aee0..26baeb7846 100644
39 @@ -548,6 +548,10 @@ static SpiceInfo *qmp_query_spice_real(Error **errp)
40 micro = SPICE_SERVER_VERSION & 0xff;
41 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
44 + info->ticket = g_strdup(auth_passwd);
48 info->has_port = true;