diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-23 13:49:51 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-08-23 18:20:28 -0300 |
commit | 352183cdb01761ba813576b3bc559947cbccbae8 (patch) | |
tree | 34f2a607c443422b9644b65cdba540cf573973d0 | |
parent | ce2769eddc578c994e07b443cabaa45821f0d535 (diff) |
monitor: don't try to initialize json parser when monitor is HMPqemu-kvm-1.2.0-rc1
Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4967,13 +4967,13 @@ void monitor_init(CharDriverState *chr, int flags) qemu_chr_add_handlers(chr, monitor_can_read, monitor_control_read, monitor_control_event, mon); qemu_chr_fe_set_echo(chr, true); + + json_message_parser_init(&mon->mc->parser, handle_qmp_command); } else { qemu_chr_add_handlers(chr, monitor_can_read, monitor_read, monitor_event, mon); } - json_message_parser_init(&mon->mc->parser, handle_qmp_command); - QLIST_INSERT_HEAD(&mon_list, mon, entry); if (!default_mon || (flags & MONITOR_IS_DEFAULT)) default_mon = mon; |