From: Yang Hongyang <[email protected]> commit e0d03b8ceb52 converted VNC startup to use SocketAddress, the interface socket_listen don't have a port_offset param, so we need to add the port offset (5900) to both 'port' and 'to' opts. currently only 'port' is added by offset. This patch add the port offset to 'to' opts.
Signed-off-by: Yang Hongyang <[email protected]> Reviewed-by: Daniel P. Berrange <[email protected]> Message-id: [email protected] Cc: Daniel P. Berrange <[email protected]> Cc: Eric Blake <[email protected]> Cc: Gerd Hoffmann <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> --- ui/vnc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index 166d1b5..a47f2b3 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3572,6 +3572,8 @@ void vnc_display_open(const char *id, Error **errp) if (to) { saddr->u.inet->has_to = true; saddr->u.inet->to = to; + saddr->u.inet->has_to = true; + saddr->u.inet->to = to + 5900; } saddr->u.inet->ipv4 = saddr->u.inet->has_ipv4 = has_ipv4; saddr->u.inet->ipv6 = saddr->u.inet->has_ipv6 = has_ipv6; -- 1.8.3.1
