From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXbzY-0001lF-7K for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:57:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXbzX-0001k5-H3 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:57:07 -0500 Received: from [199.232.76.173] (port=54384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXbzX-0001jk-BC for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:57:07 -0500 Received: from qw-out-1920.google.com ([74.125.92.147]:52045) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXbzW-0004L9-Th for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:57:07 -0500 Received: by qw-out-1920.google.com with SMTP id 4so181087qwk.4 for ; Wed, 20 Jan 2010 06:57:06 -0800 (PST) Message-ID: <4B5719A2.8090506@codemonkey.ws> Date: Wed, 20 Jan 2010 08:56:34 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] QMP: Fix asynchronous events delivery References: <20100120103759.219e043f@doriath> In-Reply-To: <20100120103759.219e043f@doriath> 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: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, agl@us.ibm.com On 01/20/2010 06:37 AM, Luiz Capitulino wrote: > Commit f039a563f200beee80cc10fd70b21ea396979dab introduces > a regression as monitor_protocol_event() will return in > the first user Monitor it finds in the QLIST_FOREACH() > loop. > > The right thing to do is to only delivery an asynchronous > event if the 'mon' is a QMP Monitor. > > The aforementioned commit was an early version, if it was > applied to stable (it should) this one has to be applied > there too. > > Signed-off-by: Luiz Capitulino > Applied. Thanks. Regards, Anthony Liguori > --- > monitor.c | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/monitor.c b/monitor.c > index 938eb3b..b2b88c1 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -377,10 +377,9 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) > } > > QLIST_FOREACH(mon,&mon_list, entry) { > - if (!monitor_ctrl_mode(mon)) > - return; > - > - monitor_json_emitter(mon, QOBJECT(qmp)); > + if (monitor_ctrl_mode(mon)) { > + monitor_json_emitter(mon, QOBJECT(qmp)); > + } > } > QDECREF(qmp); > } >