Received: from eggs.gnu.org ([208.118.235.92]:46696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGVkP-0001t3-Sa for qemu-devel@nongnu.org; Tue, 25 Sep 2012 10:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGVkI-0001uw-Cj for qemu-devel@nongnu.org; Tue, 25 Sep 2012 10:04:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGVkI-0001uk-5A for qemu-devel@nongnu.org; Tue, 25 Sep 2012 10:04:18 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8PE4H8r026540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Sep 2012 10:04:17 -0400 From: Markus Armbruster References: <1348523754-6897-1-git-send-email-lcapitulino@redhat.com> <1348523754-6897-4-git-send-email-lcapitulino@redhat.com> <87fw661gtf.fsf@blackfin.pond.sub.org> <20120925093943.1d60ec16@doriath.home> Date: Tue, 25 Sep 2012 16:04:15 +0200 In-Reply-To: <20120925093943.1d60ec16@doriath.home> (Luiz Capitulino's message of "Tue, 25 Sep 2012 09:39:43 -0300") Message-ID: <87haqmtd0g.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 3/3] qapi: convert add_client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: pbonzini@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org Luiz Capitulino writes: > On Tue, 25 Sep 2012 13:29:32 +0200 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > Also fixes a few issues while there: >> > >> > 1. The fd returned by monitor_get_fd() leaks in most error conditions >> > 2. monitor_get_fd() return value is not checked. Best case we get >> > an error that is not correctly reported, worse case one of the >> > functions using the fd (with value of -1) will explode >> > 3. A few error conditions aren't reported >> >> 4. We now "use up" @fdname always. Before, it was left alone for >> invalid @protocol. > > By "uses up" you mean that the fd will be consumed from the monitor's > poll? I guess that's true for every command that accepts fds. Yes, that's how these commands should work. Before your patch, add_graphics_client() doesn't call when protocol is invalid. Your patch fixes that. Worth mentioning in the commit message. [...]