• A
    monitor: move json init from OPEN event to init · 58617a79
    Anthony Liguori 提交于
    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: NDaniel Berrange <berrange@redhat.com>
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    58617a79
monitor.c 140.9 KB