]>
Commit | Line | Data |
---|---|---|
23102ed6 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
95259824 WB |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> |
3 | Date: Wed, 9 Dec 2015 14:32:11 +0100 | |
23102ed6 | 4 | Subject: [PATCH] qapi: modify spice query |
95259824 WB |
5 | |
6 | Provide the last ticket in the SpiceInfo struct optionally. | |
7 | --- | |
6838f038 WB |
8 | qapi/ui.json | 3 +++ |
9 | ui/spice-core.c | 5 +++++ | |
95259824 WB |
10 | 2 files changed, 8 insertions(+) |
11 | ||
6838f038 WB |
12 | diff --git a/qapi/ui.json b/qapi/ui.json |
13 | index 07b468f625..78c906ddcf 100644 | |
14 | --- a/qapi/ui.json | |
15 | +++ b/qapi/ui.json | |
16 | @@ -199,11 +199,14 @@ | |
95259824 WB |
17 | # |
18 | # @channels: a list of @SpiceChannel for each active spice channel | |
19 | # | |
a544966d | 20 | +# @ticket: The last ticket set with set_password |
95259824 WB |
21 | +# |
22 | # Since: 0.14.0 | |
23 | ## | |
24 | { 'struct': 'SpiceInfo', | |
25 | 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int', | |
26 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', | |
27 | + '*ticket': 'str', | |
28 | 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} } | |
29 | ||
30 | ## | |
31 | diff --git a/ui/spice-core.c b/ui/spice-core.c | |
6838f038 | 32 | index ea04dc69b5..05f5958b14 100644 |
95259824 WB |
33 | --- a/ui/spice-core.c |
34 | +++ b/ui/spice-core.c | |
6838f038 | 35 | @@ -551,6 +551,11 @@ SpiceInfo *qmp_query_spice(Error **errp) |
95259824 WB |
36 | micro = SPICE_SERVER_VERSION & 0xff; |
37 | info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro); | |
38 | ||
39 | + if (auth_passwd) { | |
40 | + info->has_ticket = true; | |
41 | + info->ticket = g_strdup(auth_passwd); | |
42 | + } | |
43 | + | |
44 | if (port) { | |
45 | info->has_port = true; | |
46 | info->port = port; | |
47 | -- | |
45169293 | 48 | 2.11.0 |
95259824 | 49 |