From: Luiz Capitulino Date: Fri, 18 Dec 2009 15:24:59 +0000 (-0200) Subject: QMP: Only handle converted commands X-Git-Tag: v0.12.0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b06a3f7852fad7ceeb427b733e2c4f7a0393683;p=thirdparty%2Fqemu.git QMP: Only handle converted commands Looks like I dropped this check when addressing the 'query-' commands request. QMP should only handle converted commands, obviously. Reported-by: Markus Armbruster Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori (cherry picked from commit 89f5461fc9a3c437e632f6895dc605e8f03b925e) --- diff --git a/monitor.c b/monitor.c index 96f7876d965..f4d77e2dd22 100644 --- a/monitor.c +++ b/monitor.c @@ -4070,7 +4070,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens) qobject_from_jsonf("{ 'item': %s }", info_item)); } else { cmd = monitor_find_command(cmd_name); - if (!cmd) { + if (!cmd || !monitor_handler_ported(cmd)) { qemu_error_new(QERR_COMMAND_NOT_FOUND, cmd_name); goto err_input; }