aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 19876adbc2..02829a4398 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4368,6 +4368,14 @@ void monitor_resume(Monitor *mon)
readline_show_prompt(mon->rs);
}
+static QObject *get_qmp_greeting(void)
+{
+ QObject *ver;
+
+ do_info_version(NULL, &ver);
+ return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}}",ver);
+}
+
/**
* monitor_control_event(): Print QMP gretting
*/
@@ -4379,7 +4387,7 @@ static void monitor_control_event(void *opaque, int event)
json_message_parser_init(&mon->mc->parser, handle_qmp_command);
- data = qobject_from_jsonf("{ 'QMP': { 'capabilities': [] } }");
+ data = get_qmp_greeting();
assert(data != NULL);
monitor_json_emitter(mon, data);