From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41168 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ2mF-0003l7-Hg for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:35:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ2mE-0000CE-H5 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:35:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ2mE-0000By-A0 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:35:42 -0500 Message-ID: <4CE50F89.6040007@redhat.com> Date: Thu, 18 Nov 2010 12:35:37 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][PATCH v3 11/21] virtproxy: add handler for control packet References: <1289870175-14880-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289870175-14880-12-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289870175-14880-12-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: agl@linux.vnet.ibm.com, abeekhof@redhat.com, qemu-devel@nongnu.org, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, amit.shah@redhat.com On 11/16/10 02:16, Michael Roth wrote: > Process control packets coming in over the channel. This entails setting > up/tearing down connections to local services initiated from the other > end of the channel. > > Signed-off-by: Michael Roth > --- > virtproxy.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 154 insertions(+), 0 deletions(-) [snip] > + > + qemu_opts_print(iforward->socket_opts, NULL); > + if (qemu_opt_get(iforward->socket_opts, "host") != NULL) { > + server_fd = inet_connect_opts(iforward->socket_opts); > + } else if (qemu_opt_get(iforward->socket_opts, "path") != NULL) { > + server_fd = unix_connect_opts(iforward->socket_opts); > + } else { > + LOG("unable to find listening socket host/addr info"); > + return -1; > + } This patch is a perfect example of why -1 as an error message is suboptimal. > + closesocket(fd); > + vp_set_fd_handler(fd, NULL, NULL, conn); > + QLIST_REMOVE(conn, next); > + qemu_free(conn); > + break; > + } > + } You should never have two closing braces in the same column like this - something is wrong with the formatting. Cheers, Jes