aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-21 12:09:41 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-21 12:09:41 +0000
commita953853ebab4b42506099156275525fc757f6c30 (patch)
treea1152ada1a5baf777884f5e0a7ff5689f569924b /ui
parent1cf81ea2e2ecfd2ec046e2b409e75e87808ac4d0 (diff)
parent3f0230e926b45905efb597824f59fdf5a4f3da08 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-socket-20160120-1' into staging
Convert qemu-socket to use QAPI exclusively, update MAINTAINERS. # gpg: Signature made Wed 20 Jan 2016 06:49:07 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-socket-20160120-1: vnc: distiguish between ipv4/ipv6 omitted vs set to off sockets: remove use of QemuOpts from socket_dgram sockets: remove use of QemuOpts from socket_connect sockets: remove use of QemuOpts from socket_listen sockets: remove use of QemuOpts from header file add MAINTAINERS entry for qemu socket code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 85e3462a27..339f8c35b2 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3502,8 +3502,10 @@ void vnc_display_open(const char *id, Error **errp)
const char *websocket = qemu_opt_get(opts, "websocket");
int to = qemu_opt_get_number(opts, "to", 0);
- bool has_ipv4 = qemu_opt_get_bool(opts, "ipv4", false);
- bool has_ipv6 = qemu_opt_get_bool(opts, "ipv6", false);
+ bool has_ipv4 = qemu_opt_get(opts, "ipv4");
+ bool has_ipv6 = qemu_opt_get(opts, "ipv6");
+ bool ipv4 = qemu_opt_get_bool(opts, "ipv4", false);
+ bool ipv6 = qemu_opt_get_bool(opts, "ipv6", false);
saddr = g_new0(SocketAddress, 1);
if (websocket) {
@@ -3551,8 +3553,10 @@ void vnc_display_open(const char *id, Error **errp)
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;
+ saddr->u.inet->ipv4 = ipv4;
+ saddr->u.inet->has_ipv4 = has_ipv4;
+ saddr->u.inet->ipv6 = ipv6;
+ saddr->u.inet->has_ipv6 = has_ipv6;
if (vs->ws_enabled) {
wsaddr->type = SOCKET_ADDRESS_KIND_INET;
@@ -3564,8 +3568,10 @@ void vnc_display_open(const char *id, Error **errp)
wsaddr->u.inet->has_to = true;
wsaddr->u.inet->to = to;
}
- wsaddr->u.inet->ipv4 = wsaddr->u.inet->has_ipv4 = has_ipv4;
- wsaddr->u.inet->ipv6 = wsaddr->u.inet->has_ipv6 = has_ipv6;
+ wsaddr->u.inet->ipv4 = ipv4;
+ wsaddr->u.inet->has_ipv4 = has_ipv4;
+ wsaddr->u.inet->ipv6 = ipv6;
+ wsaddr->u.inet->has_ipv6 = has_ipv6;
}
}
} else {