qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: [Qemu-devel] [PULL 6/6] vnc: fix bug: vnc server can't start when 'to' is specified
Date: Tue,  3 Nov 2015 11:01:31 +0100	[thread overview]
Message-ID: <1446544891-3600-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1446544891-3600-1-git-send-email-kraxel@redhat.com>

From: Yang Hongyang <hongyang.yang@easystack.cn>

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>
---
 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

  parent reply	other threads:[~2015-11-03 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 10:01 [Qemu-devel] [PULL 0/6] ui patch queue Gerd Hoffmann
2015-11-03 10:01 ` [Qemu-devel] [PULL 1/6] ui/curses: Fix monitor color with -curses when 256 colors Gerd Hoffmann
2015-11-03 10:01 ` [Qemu-devel] [PULL 2/6] ui/curses: Support line graphics chars on -curses mode Gerd Hoffmann
2015-11-03 10:01 ` [Qemu-devel] [PULL 3/6] ui/curses: Fix pageup/pagedown on -curses Gerd Hoffmann
2015-11-03 10:01 ` [Qemu-devel] [PULL 4/6] ui/opengl: Reduce build required libraries for opengl Gerd Hoffmann
2015-11-03 10:01 ` [Qemu-devel] [PULL 5/6] vnc: allow fall back to RAW encoding Gerd Hoffmann
2015-11-03 10:01 ` Gerd Hoffmann [this message]
2015-11-05  8:21   ` [Qemu-devel] [PULL 6/6] vnc: fix bug: vnc server can't start when 'to' is specified Markus Armbruster
2015-11-03 11:17 ` [Qemu-devel] [PULL 0/6] ui patch queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446544891-3600-7-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).