1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Tue, 10 Mar 2020 12:55:13 +0100
4 Subject: [PATCH 16/32] 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>
11 ui/spice-core.c | 5 +++++
12 2 files changed, 8 insertions(+)
14 diff --git a/qapi/ui.json b/qapi/ui.json
15 index e04525d8b4..6127990e23 100644
20 # @channels: a list of @SpiceChannel for each active spice channel
22 +# @ticket: The last ticket set with set_password
26 { 'struct': 'SpiceInfo',
27 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
28 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
30 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
31 'if': 'defined(CONFIG_SPICE)' }
33 diff --git a/ui/spice-core.c b/ui/spice-core.c
34 index ca04965ead..243466c13d 100644
37 @@ -539,6 +539,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
38 micro = SPICE_SERVER_VERSION & 0xff;
39 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
42 + info->has_ticket = true;
43 + info->ticket = g_strdup(auth_passwd);
47 info->has_port = true;