Skip to contentSkip to conversation

vnc: fix bug: vnc server can't start when 'to' is specified

PATCH In review Yang Hongyang 3 participants 3 messages Oct 27, 2015 – Oct 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

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(-)
ui/vnc.c +1 -1
index faff054..db24545 100644
@@ -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;
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · 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.

Cc Daniel P. Berrange <[email protected]>
Cc Eric Blake <[email protected]>
Cc Gerd Hoffmann <[email protected]>

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
#2 lore raw
In reply to Yang Hongyang
Quoted 5 lines · 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.

added to vnc patch queue.

thanks,
Gerd