Patchwork [13/13] QMP: Drop old input object checking

login
register
mail settings
Submitter Luiz Capitulino
Date June 22, 2010, 5:40 p.m.
Message ID <1277228451-7741-14-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/56558/
State New
Headers show

Comments

Luiz Capitulino - June 22, 2010, 5:40 p.m.
Previous commit added qmp_check_input_obj(), it does all the
checking we need.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index a24a152..c558cc7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4239,9 +4239,6 @@  static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
     if (!obj) {
         qerror_report(QERR_QMP_BAD_INPUT_OBJECT, "execute");
         goto err_input;
-    } else if (qobject_type(obj) != QTYPE_QSTRING) {
-        qerror_report(QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute", "string");
-        goto err_input;
     }
 
     cmd_name = qstring_get_str(qobject_to_qstring(obj));
@@ -4273,9 +4270,6 @@  static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
     obj = qdict_get(input, "arguments");
     if (!obj) {
         args = qdict_new();
-    } else if (qobject_type(obj) != QTYPE_QDICT) {
-        qerror_report(QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "arguments", "object");
-        goto err_input;
     } else {
         args = qobject_to_qdict(obj);
         QINCREF(args);