diff options
author | Markus Armbruster | 2018-07-03 10:53:43 +0200 |
---|---|---|
committer | Markus Armbruster | 2018-07-03 23:18:56 +0200 |
commit | 69240fe62d1ae02257bc0694a11c478b10378948 (patch) | |
tree | 27c70b833e5435b942932de13221b49983e8e1b4 /include/qapi/qmp | |
parent | tests/qmp-test: Demonstrate QMP errors jumping the queue (diff) | |
download | qemu-69240fe62d1ae02257bc0694a11c478b10378948.tar.gz qemu-69240fe62d1ae02257bc0694a11c478b10378948.tar.xz qemu-69240fe62d1ae02257bc0694a11c478b10378948.zip |
qmp: Don't let malformed in-band commands jump the queue
handle_qmp_command() reports certain errors right away. This is wrong
when OOB is enabled, because the errors can "jump the queue" then, as
the previous commit demonstrates.
To fix, we need to delay errors until dispatch. Do that for semantic
errors, mostly by reverting ill-advised parts of commit cf869d53172
"qmp: support out-of-band (oob) execution". Bonus: doesn't run
qmp_dispatch_check_obj() twice, once in handle_qmp_command(), and
again in do_qmp_dispatch(). That's also due to commit cf869d53172.
The next commit will fix queue jumping for syntax errors.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-18-armbru@redhat.com>
Diffstat (limited to 'include/qapi/qmp')
-rw-r--r-- | include/qapi/qmp/dispatch.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h index 303a15ba84..514bfc45b0 100644 --- a/include/qapi/qmp/dispatch.h +++ b/include/qapi/qmp/dispatch.h @@ -48,8 +48,6 @@ bool qmp_command_is_enabled(const QmpCommand *cmd); const char *qmp_command_name(const QmpCommand *cmd); bool qmp_has_success_response(const QmpCommand *cmd); QObject *qmp_build_error_object(Error *err); -QDict *qmp_dispatch_check_obj(const QObject *request, bool allow_oob, - Error **errp); QObject *qmp_dispatch(QmpCommandList *cmds, QObject *request, bool allow_oob); bool qmp_is_oob(QDict *dict); |