From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXZp4-0001zJ-Bj for qemu-devel@nongnu.org; Wed, 20 Jan 2010 07:38:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXZp0-0001xP-Pa for qemu-devel@nongnu.org; Wed, 20 Jan 2010 07:38:10 -0500 Received: from [199.232.76.173] (port=44331 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXZp0-0001xJ-CU for qemu-devel@nongnu.org; Wed, 20 Jan 2010 07:38:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14559) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXZoz-0002Oq-23 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 07:38:05 -0500 Date: Wed, 20 Jan 2010 10:37:59 -0200 From: Luiz Capitulino Message-ID: <20100120103759.219e043f@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] QMP: Fix asynchronous events delivery List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, agl@us.ibm.com 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 --- 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); } -- 1.6.6