QMP: Fix asynchronous events delivery
Commitf039a563f2
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 commit23fabed136
)
This commit is contained in:
parent
c502715a74
commit
d3bf9367f2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue