summaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2010-01-14 14:50:58 -0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-19 16:31:03 -0600
commitf20c9782231c394b343b49137ee0ef900bfcfd22 (patch)
tree8cfbe626b2b9d35ec57fb265bc4cd9c41516dcd5 /vnc.c
parentd93180e3af9d136ac7ea7a3ab8ba98bbd5f532de (diff)
downloadqemu-f20c9782231c394b343b49137ee0ef900bfcfd22.tar.gz
qemu-f20c9782231c394b343b49137ee0ef900bfcfd22.tar.bz2
qemu-f20c9782231c394b343b49137ee0ef900bfcfd22.zip
QMP: Introduce VNC_DISCONNECTED event
It's emitted when a VNC client disconnects from QEMU, client's information such as port and IP address are provided. Event example: { "event": "VNC_DISCONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 }, "data": { "server": { "auth": "sasl", "family": "ipv4", "service": "5901", "host": "0.0.0.0" }, "client": { "family": "ipv4", "service": "58425", "host": "127.0.0.1", "sasl_username": "foo" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vnc.c b/vnc.c
index 6d488e52ce..a590bb9c81 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1108,6 +1108,8 @@ static void vnc_disconnect_start(VncState *vs)
static void vnc_disconnect_finish(VncState *vs)
{
+ vnc_qmp_event(vs, QEVENT_VNC_DISCONNECTED);
+
if (vs->input.buffer) {
qemu_free(vs->input.buffer);
vs->input.buffer = NULL;