]> git.proxmox.com Git - qemu.git/commit
QMP: Emit asynchronous events on all QMP monitors
authorAdam Litke <agl@us.ibm.com>
Fri, 15 Jan 2010 14:34:02 +0000 (08:34 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 19 Jan 2010 22:42:15 +0000 (16:42 -0600)
commit41ae9ece21eccad7b1a6262d0a473572f0a4b75f
tree3fda28bbde3434e70627597fbfab6eb6d7498316
parent40480d2bf4b4f5770b1f740672c5d890bf9cee19
QMP: Emit asynchronous events on all QMP monitors

When using a control/QMP monitor in tandem with a regular monitor, asynchronous
messages can get lost depending on the order of the QEMU program arguments.
QEMU events issued by monitor_protocol_event() always go to cur_mon.  If the
user monitor was specified on the command line first (or it has ,default), the
message will be directed to the user monitor (not the QMP monitor).
Additionally, only one QMP session is currently able to receive async messages.

To avoid this confusion, scan through the list of monitors and emit the message
on each QMP monitor.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit f039a563f200beee80cc10fd70b21ea396979dab)
monitor.c