Revision 58617a79
b/monitor.c | ||
---|---|---|
4832 | 4832 |
switch (event) { |
4833 | 4833 |
case CHR_EVENT_OPENED: |
4834 | 4834 |
mon->mc->command_mode = 0; |
4835 |
json_message_parser_init(&mon->mc->parser, handle_qmp_command); |
|
4836 | 4835 |
data = get_qmp_greeting(); |
4837 | 4836 |
monitor_json_emitter(mon, data); |
4838 | 4837 |
qobject_decref(data); |
... | ... | |
4840 | 4839 |
break; |
4841 | 4840 |
case CHR_EVENT_CLOSED: |
4842 | 4841 |
json_message_parser_destroy(&mon->mc->parser); |
4842 |
json_message_parser_init(&mon->mc->parser, handle_qmp_command); |
|
4843 | 4843 |
mon_refcount--; |
4844 | 4844 |
monitor_fdsets_cleanup(); |
4845 | 4845 |
break; |
... | ... | |
4951 | 4951 |
monitor_event, mon); |
4952 | 4952 |
} |
4953 | 4953 |
|
4954 |
json_message_parser_init(&mon->mc->parser, handle_qmp_command); |
|
4955 |
|
|
4954 | 4956 |
QLIST_INSERT_HEAD(&mon_list, mon, entry); |
4955 | 4957 |
if (!default_mon || (flags & MONITOR_IS_DEFAULT)) |
4956 | 4958 |
default_mon = mon; |
Also available in: Unified diff