summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorLuiz Capitulino2010-01-20 13:37:59 +0100
committerAnthony Liguori2010-01-20 15:25:23 +0100
commit23fabed13645fdf66473e458f318baa63be56b22 (patch)
tree83d89284c7e4472121a9c7f292e61fe04de643fd /monitor.c
parentvnc: Use inet_strfamily() (diff)
downloadqemu-23fabed13645fdf66473e458f318baa63be56b22.tar.gz
qemu-23fabed13645fdf66473e458f318baa63be56b22.tar.xz
qemu-23fabed13645fdf66473e458f318baa63be56b22.zip
QMP: Fix asynchronous events delivery
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 <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/monitor.c b/monitor.c
index 801a92601e..cadf422e3f 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);
}