From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInuM-0004uP-Kg for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:38:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInuI-0004pR-Sg for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:38:34 -0500 Received: from [199.232.76.173] (port=44217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInuI-0004pH-N4 for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:38:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16357) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInuJ-0005UM-6U for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:38:31 -0500 Date: Thu, 10 Dec 2009 16:37:59 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 20/20] VNC: Convert do_info_vnc() to QObject Message-ID: <20091210163759.585f7367@doriath> In-Reply-To: <4B211408.2040205@linux.vnet.ibm.com> References: <1260456215-31022-1-git-send-email-lcapitulino@redhat.com> <1260456215-31022-21-git-send-email-lcapitulino@redhat.com> <4B211408.2040205@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Thu, 10 Dec 2009 09:30:16 -0600 Anthony Liguori wrote: > malc wrote: > > On Thu, 10 Dec 2009, Luiz Capitulino wrote: > > > > > >> 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 > >> > > [..snip..] > > > > > >> + > >> +static int vnc_qdict_local_addr(QDict *qdict, int fd) > >> +{ > >> + struct sockaddr_storage sa; > >> + socklen_t salen; > >> + > >> + salen = sizeof(sa); > >> + if (getsockname(fd, (struct sockaddr*)&sa, &salen) < 0) > >> + return -1; > >> > > > > Coding style violation, here and all over the place. > > > > Indeed, please fix. I can see only the if braces missing, anything else?