提交 de79ba6f 编写于 作者: L Luiz Capitulino

Monitor: Directly call QObject handlers

This avoids handle_user_command() calling monitor_call_handler(),
which is currently shared with QMP.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 4903de0c
...@@ -3917,7 +3917,15 @@ static void handle_user_command(Monitor *mon, const char *cmdline) ...@@ -3917,7 +3917,15 @@ static void handle_user_command(Monitor *mon, const char *cmdline)
if (handler_is_async(cmd)) { if (handler_is_async(cmd)) {
user_async_cmd_handler(mon, cmd, qdict); user_async_cmd_handler(mon, cmd, qdict);
} else if (handler_is_qobject(cmd)) { } else if (handler_is_qobject(cmd)) {
monitor_call_handler(mon, cmd, qdict); QObject *data = NULL;
/* XXX: ignores the error code */
cmd->mhandler.cmd_new(mon, qdict, &data);
assert(!monitor_has_error(mon));
if (data) {
cmd->user_print(mon, data);
qobject_decref(data);
}
} else { } else {
cmd->mhandler.cmd(mon, qdict); cmd->mhandler.cmd(mon, qdict);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册