[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] vnc: add a is_vnc_active() helper
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH 5/6] vnc: add a is_vnc_active() helper |
Date: |
Tue, 29 Sep 2009 17:34:47 +0530 |
This helper is introduced to query the status of vnc.
Signed-off-by: Amit Shah <address@hidden>
---
vnc.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/vnc.c b/vnc.c
index 5eaef6a..ff2d4a8 100644
--- a/vnc.c
+++ b/vnc.c
@@ -178,9 +178,17 @@ static void do_info_vnc_client(Monitor *mon, VncState
*client)
#endif
}
-void do_info_vnc(Monitor *mon)
+static int is_vnc_active(void)
{
if (vnc_display == NULL || vnc_display->display == NULL) {
+ return 0;
+ }
+ return 1;
+}
+
+void do_info_vnc(Monitor *mon)
+{
+ if (!is_vnc_active()) {
monitor_printf(mon, "Server: disabled\n");
} else {
char *serverAddr = vnc_socket_local_addr(" address: %s:%s\n",
--
1.6.2.5
- [Qemu-devel] virtio-console-bus, multiport, virtio-console-port, Amit Shah, 2009/09/29
- [Qemu-devel] [PATCH 1/6] char: Emit 'OPENED' events on char device open, Amit Shah, 2009/09/29
- [Qemu-devel] [PATCH 2/6] qdev: add string property., Amit Shah, 2009/09/29
- [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Amit Shah, 2009/09/29
- [Qemu-devel] [PATCH 4/6] virtio-console-port: Add a new device on the virtio-console-bus for generic host-guest communication, Amit Shah, 2009/09/29
- [Qemu-devel] [PATCH 5/6] vnc: add a is_vnc_active() helper,
Amit Shah <=
- [Qemu-devel] [PATCH 6/6] vnc: Add a virtio-console-bus device to send / receive guest clipboard, Amit Shah, 2009/09/29
- Re: [Qemu-devel] [PATCH 6/6] vnc: Add a virtio-console-bus device to send / receive guest clipboard, Gerd Hoffmann, 2009/09/29
- Re: [Qemu-devel] [PATCH 6/6] vnc: Add a virtio-console-bus device to send / receive guest clipboard, Amit Shah, 2009/09/30
- Re: [Qemu-devel] [PATCH 4/6] virtio-console-port: Add a new device on the virtio-console-bus for generic host-guest communication, Gerd Hoffmann, 2009/09/29
- Re: [Qemu-devel] [PATCH 4/6] virtio-console-port: Add a new device on the virtio-console-bus for generic host-guest communication, Nathan Baum, 2009/09/30
- Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Gerd Hoffmann, 2009/09/29
- Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Amit Shah, 2009/09/30
- Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Gerd Hoffmann, 2009/09/30
- Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Amit Shah, 2009/09/30
- Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports, Gerd Hoffmann, 2009/09/30