1 From d72cdaed95ca8c8d39b367e187bcc03f0c3c3e42 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Wed, 9 Dec 2015 14:32:11 +0100
4 Subject: [PATCH 09/41] qapi: modify spice query
6 Provide the last ticket in the SpiceInfo struct optionally.
8 qapi-schema.json | 3 +++
9 ui/spice-core.c | 5 +++++
10 2 files changed, 8 insertions(+)
12 diff --git a/qapi-schema.json b/qapi-schema.json
13 index 3ac59c5..1aa434d 100644
14 --- a/qapi-schema.json
15 +++ b/qapi-schema.json
16 @@ -1120,11 +1120,14 @@
18 # @channels: a list of @SpiceChannel for each active spice channel
20 +# @ticket: #optional The last ticket set with set_password
24 { 'struct': 'SpiceInfo',
25 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
26 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
28 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
31 diff --git a/ui/spice-core.c b/ui/spice-core.c
32 index 6a62d71..05d24a1 100644
35 @@ -537,6 +537,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
36 micro = SPICE_SERVER_VERSION & 0xff;
37 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
40 + info->has_ticket = true;
41 + info->ticket = g_strdup(auth_passwd);
45 info->has_port = true;