diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-08-03 18:22:51 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-08-03 18:22:51 +0100 |
commit | 29b2517ac79ecd42c169248668e4007dee90dc5a (patch) | |
tree | d5b0926ed82e0c57866d82abe5169e6c716a43c0 | |
parent | 6eac5f7bad6cd8f56b3514ac485dd35d79abff66 (diff) | |
parent | 12e29b1682e0a50ed57c324152addb585ae5ce69 (diff) | |
download | qemu-29b2517ac79ecd42c169248668e4007dee90dc5a.zip qemu-29b2517ac79ecd42c169248668e4007dee90dc5a.tar.gz qemu-29b2517ac79ecd42c169248668e4007dee90dc5a.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20160803-1' into staging
vnc: fixes for "-vnc none".
# gpg: Signature made Wed 03 Aug 2016 16:33:07 BST
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/pull-vnc-20160803-1:
vnc: ensure connection sharing/limits is always configured
vnc: fix crash when vnc_server_info_get has an error
vnc: don't crash getting server info if lsock is NULL
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | ui/vnc.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -143,6 +143,11 @@ static void vnc_init_basic_info_from_server_addr(QIOChannelSocket *ioc, { SocketAddress *addr = NULL; + if (!ioc) { + error_setg(errp, "No listener socket available"); + return; + } + addr = qio_channel_socket_get_local_address(ioc, errp); if (!addr) { return; @@ -219,7 +224,7 @@ static VncServerInfo *vnc_server_info_get(VncDisplay *vd) VncServerInfo *info; Error *err = NULL; - info = g_malloc(sizeof(*info)); + info = g_malloc0(sizeof(*info)); vnc_init_basic_info_from_server_addr(vd->lsock, qapi_VncServerInfo_base(info), &err); info->has_auth = true; @@ -3145,6 +3150,9 @@ void vnc_display_init(const char *id) if (!vs->kbd_layout) exit(1); + vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; + vs->connections_limit = 32; + qemu_mutex_init(&vs->mutex); vnc_start_worker_thread(); |