qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vnc: fix bug: vnc server can't start when 'to' is specified
@ 2015-10-27  6:10 Yang Hongyang
  2015-10-27  7:25 ` Daniel P. Berrange
  2015-10-28 14:43 ` Gerd Hoffmann
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Hongyang @ 2015-10-27  6:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Yang Hongyang

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>
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-28 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27  6:10 [Qemu-devel] [PATCH] vnc: fix bug: vnc server can't start when 'to' is specified Yang Hongyang
2015-10-27  7:25 ` Daniel P. Berrange
2015-10-28 14:43 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).