qemu's event has following format:
{
"timestamp": {
"seconds": 1435580974,
"microseconds": 82226
},
"event": "SPICE_INITIALIZED",
"data": {
"server": {
"auth": "none",
"port": "5900",
"family": "ipv4",
"host": "127.0.0.1"
},
"client": {
"port": "53224",
"family": "ipv4",
"channel-type": 3,
"connection-id": 1113096064,
"host": "127.0.0.1",
"channel-id": 0,
"tls": false
}
}
}
Our code tried to extract the "service" field but qemu reports it as
"port".
---
src/qemu/qemu_monitor_json.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d3e98d4..bd73b05 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -652,7 +652,7 @@ static void qemuMonitorJSONHandleGraphics(qemuMonitorPtr mon,
virJSONValuePtr da
VIR_WARN("missing local hostname in graphics event");
return;
}
- localService = virJSONValueObjectGetString(server, "service");
+ localService = virJSONValueObjectGetString(server, "port");
if (!localService)
localService = ""; /* Spice has multiple ports, so this isn't
provided */
@@ -666,7 +666,7 @@ static void qemuMonitorJSONHandleGraphics(qemuMonitorPtr mon,
virJSONValuePtr da
VIR_WARN("missing remote hostname in graphics event");
return;
}
- remoteService = virJSONValueObjectGetString(client, "service");
+ remoteService = virJSONValueObjectGetString(client, "port");
if (!remoteService)
remoteService = ""; /* Spice has multiple ports, so this isn't
provided */
--
2.4.1