QMP: Fix asynchronous events delivery
commitd3bf9367f2de89e237d75eda2c3c861b3a400ec0
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 20 Jan 2010 12:37:59 +0000 (20 10:37 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 20 Jan 2010 14:53:24 +0000 (20 08:53 -0600)
treea48834e6f789fff86ccdaf04b017206a65605b5e
parentc502715a74675b3554cf7bcd684b82c9733ecfae
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)
monitor.c