]> git.proxmox.com Git - 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)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 23 Aug 2012 13:03:21 +0000 (08:03 -0500)
commit58617a795c8067b2f9800cffce60f38707d3aa31
tree9416fc64fe402daed6c45c3ed6d556d30c9311d8
parentb4a738bf93c3137b92d532e59d60edccc4e1ea96
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>
monitor.c