From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIicw-0007LQ-NZ for qemu-devel@nongnu.org; Thu, 10 Dec 2009 08:00:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIics-0007JR-Q7 for qemu-devel@nongnu.org; Thu, 10 Dec 2009 08:00:14 -0500 Received: from [199.232.76.173] (port=41414 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIicr-0007Iw-AY for qemu-devel@nongnu.org; Thu, 10 Dec 2009 08:00:09 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:41533) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIicq-0006GG-Ub for qemu-devel@nongnu.org; Thu, 10 Dec 2009 08:00:09 -0500 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e5.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nBACmgSn030271 for ; Thu, 10 Dec 2009 07:48:42 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBAD05mA082760 for ; Thu, 10 Dec 2009 08:00:05 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nBAD05g0026863 for ; Thu, 10 Dec 2009 11:00:05 -0200 Message-ID: <4B20F0D1.3090000@linux.vnet.ibm.com> Date: Thu, 10 Dec 2009 07:00:01 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 19/19] VNC: Convert do_info_vnc() to QObject References: <1260376078-8694-1-git-send-email-lcapitulino@redhat.com> <1260376078-8694-20-git-send-email-lcapitulino@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Anthony Liguori , qemu-devel@nongnu.org, Luiz Capitulino Markus Armbruster wrote: > Luiz Capitulino writes: > > >> Return a QDict with server information. Connected clients are returned >> as a QList of QDicts. >> >> The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() and >> put_addr_qdict()) are used to insert 'host' and 'service' information >> in the returned QDict. >> >> This patch is big, but I don't see how to split it. >> >> Signed-off-by: Luiz Capitulino >> --- >> console.h | 3 +- >> monitor.c | 3 +- >> vnc.c | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++---------- >> 3 files changed, 164 insertions(+), 33 deletions(-) >> >> > [...] > >> diff --git a/vnc.c b/vnc.c >> index 32c4678..f0fea6a 100644 >> --- a/vnc.c >> +++ b/vnc.c >> > [...] > >> +/** >> + * do_info_vnc(): Show VNC server information >> + * >> + * Return a QDict with server information. Connected clients are returned >> + * as a QList of QDicts. >> + * >> + * The main QDict contains the following: >> + * >> + * - "status": "disabled" or "enabled" >> + * - "host": server's IP address >> + * - "service": server's port number >> + * - "auth": authentication method (optional) >> + * - "clients": a QList of all connected clients >> + * >> + * Clients are described by a QDict, with the following information: >> + * >> + * - "host": client's IP address >> + * - "service": client's port number >> + * - "x509 dname": TLS dname (optional) >> > > Sure you want dict keys with spaces? I'd prefer "x509-dname". > +1 Actually, x509_dname is preferable. While the JSON spec doesn't say this, in JavaScript, dictionaries are indistinguishable from objects. It's better for the key names to be valid identifiers. -- Regards, Anthony Liguori