From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y22Ix-0005vC-2H for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:29:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y22Is-00064D-3y for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:29:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y22Ir-000623-SQ for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:29:30 -0500 Message-ID: <549469ED.4030204@redhat.com> Date: Fri, 19 Dec 2014 11:09:49 -0700 From: Eric Blake MIME-Version: 1.0 References: <1418979866-1615-1-git-send-email-kraxel@redhat.com> <1418979866-1615-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1418979866-1615-11-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PULL 10/10] monitor: add vnc websockets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: Markus Armbruster , Anthony Liguori , Luiz Capitulino On 12/19/2014 02:04 AM, Gerd Hoffmann wrote: > Add websockets bool to VncBasicInfo, report websocket server sockets, > flag websocket client connections. > > Signed-off-by: Gerd Hoffmann > --- > qapi-schema.json | 5 ++++- > ui/vnc.c | 15 ++++++++++++--- > 2 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/qapi-schema.json b/qapi-schema.json > index 2d45d4c..07deb71 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -672,12 +672,15 @@ > # > # @family: address family > # > +# @websocket: true in case the socket is a websocket (since 2.3). > +# > # Since: 2.1 > ## > { 'type': 'VncBasicInfo', > 'data': { 'host': 'str', > 'service': 'str', > - 'family': 'NetworkAddressFamily' } } > + 'family': 'NetworkAddressFamily', > + 'websocket': 'bool' } } This says the field is mandatory; > +++ b/ui/vnc.c > @@ -353,6 +353,9 @@ static VncClientInfo *qmp_query_vnc_client(const VncState *client) > info->base->host = g_strdup(host); > info->base->service = g_strdup(serv); > info->base->family = inet_netfamily(sa.ss_family); > +#ifdef CONFIG_VNC_WS > + info->base->websocket = client->websocket; > +#endif while this only conditionally assigns it. Fortunately, in the context not shown here, you use g_malloc0 for initializing info->base, so it works out. Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org