]> git.proxmox.com Git - qemu.git/commitdiff
QMP: Only handle converted commands
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 18 Dec 2009 15:24:59 +0000 (13:24 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 19 Dec 2009 14:26:27 +0000 (08:26 -0600)
Looks like I dropped this check when addressing the 'query-'
commands request.

QMP should only handle converted commands, obviously.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 89f5461fc9a3c437e632f6895dc605e8f03b925e)

monitor.c

index 96f7876d9656541bd4a1d8847e10d24dcaf4a5ef..f4d77e2dd222c8e1f577acea6aeadee237dc83b8 100644 (file)
--- 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;
         }