From b19504b7a808d424682b3e4e421fe080d1386e9c Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 18 Dec 2009 13:24:59 -0200 Subject: [PATCH] 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 --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 96f7876..f4d77e2 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; } -- 2.7.4