aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorYang Hongyang <hongyang.yang@easystack.cn>2015-10-27 14:10:52 +0800
committerGerd Hoffmann <kraxel@redhat.com>2015-11-03 10:21:49 +0100
commit4d77b1f23877b579b94421d0cab2bebc79f4e171 (patch)
treea1082905a667d8aab9296beef46a9ce48f6b478e /ui
parentde3f7de7f4e257ce44cdabb90f5f17ee99624557 (diff)
vnc: fix bug: vnc server can't start when 'to' is specified
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 <hongyang.yang@easystack.cn> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1445926252-14830-1-git-send-email-hongyang.yang@easystack.cn Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Eric Blake <eblake@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 166d1b5b5f..a47f2b382c 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;