Message ID | 20170124095332.23955-2-berrange@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/ui/vnc.c b/ui/vnc.c index 29aa9c4..c82e476 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3586,7 +3586,13 @@ void vnc_display_open(const char *id, Error **errp) wsaddr->type = SOCKET_ADDRESS_KIND_INET; inet = wsaddr->u.inet.data = g_new0(InetSocketAddress, 1); inet->host = g_strdup(saddr->u.inet.data->host); - inet->port = g_strdup(websocket); + if (g_str_equal(websocket, "") || + g_str_equal(websocket, "on")) { + inet->port = g_strdup_printf( + "%d", (int)baseport + 5700); + } else { + inet->port = g_strdup(websocket); + } if (to) { inet->has_to = true;