From: Amit Shah <amit.shah@redhat.com>
To: qemu-devel@nongnu.org
Cc: Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] [PATCH 4/5] vnc: add a is_vnc_active() helper
Date: Fri, 11 Sep 2009 21:22:32 +0530 [thread overview]
Message-ID: <1252684353-25067-5-git-send-email-amit.shah@redhat.com> (raw)
In-Reply-To: <1252684353-25067-4-git-send-email-amit.shah@redhat.com>
This helper is introduced to query the status of vnc.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
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
next prev parent reply other threads:[~2009-09-11 15:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 15:52 [Qemu-devel] Multiple ports for virtio-console Amit Shah
2009-09-11 15:52 ` [Qemu-devel] [PATCH 1/5] char: Emit 'OPENED' events on char device open Amit Shah
2009-09-11 15:52 ` [Qemu-devel] [PATCH 2/5] virtio-console: Add support for multiple ports for generic guest-host communication Amit Shah
2009-09-11 15:52 ` [Qemu-devel] [PATCH 3/5] virtio-console: Add a in-qemu api for open/read/write/close ports Amit Shah
2009-09-11 15:52 ` Amit Shah [this message]
2009-09-11 15:52 ` [Qemu-devel] [PATCH 5/5] vnc: Send / receive guest clipboard if virtio-console connected to clipboard port Amit Shah
2009-09-11 16:17 ` [Qemu-devel] Re: [PATCH 2/5] virtio-console: Add support for multiple ports for generic guest-host communication Anthony Liguori
2009-09-11 16:34 ` Amit Shah
2009-09-11 16:38 ` Anthony Liguori
2009-09-11 17:30 ` Amit Shah
2009-09-11 17:34 ` Anthony Liguori
2009-09-14 7:48 ` Amit Shah
2009-09-14 7:55 ` Amit Shah
2009-09-14 12:55 ` Anthony Liguori
2009-09-14 12:58 ` Amit Shah
-- strict thread matches above, loose matches on Subject: below --
2009-09-09 8:11 [Qemu-devel] Multiple Port Support for virtio-console Amit Shah
2009-09-09 8:12 ` [Qemu-devel] [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication Amit Shah
2009-09-09 8:12 ` [Qemu-devel] [PATCH 1/5] char: Emit 'OPENED' events on char device open Amit Shah
2009-09-09 8:12 ` [Qemu-devel] [PATCH 2/5] virtio-console: Add support for multiple ports for generic guest-host communication Amit Shah
2009-09-09 8:12 ` [Qemu-devel] [PATCH 3/5] virtio-console: in-qemu api for open/read/write/close ports Amit Shah
2009-09-09 8:12 ` [Qemu-devel] [PATCH 4/5] vnc: add a is_vnc_active() helper Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252684353-25067-5-git-send-email-amit.shah@redhat.com \
--to=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).