diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -334,13 +334,10 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) { QDict *qmp; const char *event_name; - Monitor *mon = cur_mon; + Monitor *mon; assert(event < QEVENT_MAX); - if (!monitor_ctrl_mode(mon)) - return; - switch (event) { case QEVENT_DEBUG: event_name = "DEBUG"; @@ -379,7 +376,12 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) qdict_put_obj(qmp, "data", data); } - monitor_json_emitter(mon, QOBJECT(qmp)); + QLIST_FOREACH(mon, &mon_list, entry) { + if (!monitor_ctrl_mode(mon)) + return; + + monitor_json_emitter(mon, QOBJECT(qmp)); + } QDECREF(qmp); } |