mirror of https://gitlab.com/qemu-project/qemu
QMP: handle_qmp_command(): Move 'cmd' sanity check
Next commit will change how query commands are handled in a way that the 'cmd' sanity check is also going to be needed for query commands handling. Let's move it out of the else body then. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
945c5ac8d3
commit
0fb88582e6
|
@ -4375,12 +4375,12 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
|
||||||
qobject_from_jsonf("{ 'item': %s }", info_item));
|
qobject_from_jsonf("{ 'item': %s }", info_item));
|
||||||
} else {
|
} else {
|
||||||
cmd = monitor_find_command(cmd_name);
|
cmd = monitor_find_command(cmd_name);
|
||||||
if (!cmd || !monitor_handler_ported(cmd)
|
}
|
||||||
|| monitor_cmd_user_only(cmd)) {
|
|
||||||
|
if (!cmd || !monitor_handler_ported(cmd) || monitor_cmd_user_only(cmd)) {
|
||||||
qerror_report(QERR_COMMAND_NOT_FOUND, cmd_name);
|
qerror_report(QERR_COMMAND_NOT_FOUND, cmd_name);
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
obj = qdict_get(input, "arguments");
|
obj = qdict_get(input, "arguments");
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
|
|
Loading…
Reference in New Issue