]> git.proxmox.com Git - mirror_qemu.git/commit
ui: refactor VncDisplay to allow multiple listening sockets
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 3 Feb 2017 12:06:44 +0000 (12:06 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 8 Feb 2017 13:59:37 +0000 (14:59 +0100)
commit4ee74fa7082a1a521dc5f7a4b61a62b61d1480b2
tree55c418c2561dfc0ab3d17a4986630338d824296e
parent2a7e6857cd3178d705a49c4adde2f3af26ed3ae1
ui: refactor VncDisplay to allow multiple listening sockets

Currently there is only a single listener for plain VNC and
a single listener for websockets VNC. This means that if
getaddrinfo() returns multiple IP addresses, for a hostname,
the VNC server can only listen on one of them. This is
just bearable if listening on wildcard interface, or if
the host only has a single network interface to listen on,
but if there are multiple NICs and the VNC server needs
to listen on 2 or more specific IP addresses, it can't be
done.

This refactors the VncDisplay state so that it holds an
array of listening sockets, but still only listens on
one socket.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170203120649.15637-4-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c
ui/vnc.h