]> git.ipfire.org Git - thirdparty/qemu.git/commit
monitor: move json init from OPEN event to init
authorAnthony Liguori <aliguori@us.ibm.com>
Thu, 23 Aug 2012 13:03:21 +0000 (08:03 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Aug 2012 06:50:02 +0000 (01:50 -0500)
commit50d0184cb7be68a521a19073c92c5ffc6adb728f
tree9776d4adc9353f9d4263a0f0dd88787c28f41428
parentc068d37020f8c0d10beaf4671c41b05b923d7896
monitor: move json init from OPEN event to init

At some point in the past, the OPEN event was changed to be issued from a
bottom half.  This creates a small window whereas a data callback registered in
init may be invoked before the OPEN event has been issued.

This is reproducible with:

 echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp stdio

We can fix this for the monitor by moving the parser initialization to init.

The remaining state that is set in OPEN appears harmless.

Reported-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 58617a795c8067b2f9800cffce60f38707d3aa31)

Conflicts:

monitor.c

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
monitor.c