From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8JKr-0001bj-GP for qemu-devel@nongnu.org; Wed, 11 Nov 2009 14:58:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8JKm-0001VL-HH for qemu-devel@nongnu.org; Wed, 11 Nov 2009 14:58:32 -0500 Received: from [199.232.76.173] (port=36208 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8JKm-0001V4-9w for qemu-devel@nongnu.org; Wed, 11 Nov 2009 14:58:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16172) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8JKl-0001zy-9t for qemu-devel@nongnu.org; Wed, 11 Nov 2009 14:58:27 -0500 Date: Wed, 11 Nov 2009 17:58:10 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] Re: [PATCH 10/11] Add a QObject JSON wrapper Message-ID: <20091111175810.4bcf66ba@doriath> In-Reply-To: <4AFB12F1.5080406@codemonkey.ws> References: <1257960543-26373-1-git-send-email-aliguori@us.ibm.com> <1257960543-26373-10-git-send-email-aliguori@us.ibm.com> <20091111161205.00eac61f@doriath> <4AFB12F1.5080406@codemonkey.ws> 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: Anthony Liguori , qemu-devel@nongnu.org On Wed, 11 Nov 2009 13:39:29 -0600 Anthony Liguori wrote: > Luiz Capitulino wrote: > > I think we should abort() on error, assuming the only way to fail > > is a bad syntax. > > > > We'll be using qobject_from_jsonf() to parse incoming QMP traffic. We > definitely don't want to abort when we receive invalid input on the QMP > port. Best to just close the session and let the user connect again. Sure, I just wouldn't like to add a check on every handler call to qobject_from_jsonf(). What about a new wrapper?