diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-01-20 10:37:59 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-20 08:53:24 -0600 |
commit | d3bf9367f2de89e237d75eda2c3c861b3a400ec0 (patch) | |
tree | a48834e6f789fff86ccdaf04b017206a65605b5e /monitor.c | |
parent | Documentation: Add missing documentation for qdev related command line options (diff) | |
download | qemu-kvm-d3bf9367f2de89e237d75eda2c3c861b3a400ec0.tar.gz qemu-kvm-d3bf9367f2de89e237d75eda2c3c861b3a400ec0.tar.bz2 qemu-kvm-d3bf9367f2de89e237d75eda2c3c861b3a400ec0.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>
(cherry picked from commit 23fabed13645fdf66473e458f318baa63be56b22)
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -368,10 +368,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); } |