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]> Cc: Daniel P. Berrange <[email protected]> Cc: Eric Blake <[email protected]> Cc: Gerd Hoffmann <[email protected]> --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index faff054..db24545 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3545,7 +3545,7 @@ void vnc_display_open(const char *id, Error **errp) if (to) { saddr->inet->has_to = true; - saddr->inet->to = to; + saddr->inet->to = to + 5900; } saddr->inet->ipv4 = saddr->inet->has_ipv4 = has_ipv4; saddr->inet->ipv6 = saddr->inet->has_ipv6 = has_ipv6; -- 2.5.0
