aboutsummaryrefslogtreecommitdiff
path: root/include/qapi/qmp/dispatch.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-10-05 17:58:47 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-10-09 07:08:19 +0200
commit41725fa7eda1d97576fc8c79b58d04a61629f40e (patch)
treea0e2212ef757445c25a6bc4d385e0c999f832dc5 /include/qapi/qmp/dispatch.h
parent57d3635e42752289388b0a178fd636acbf3b90fa (diff)
qmp: Call monitor_set_cur() only in qmp_dispatch()
The correct way to set the current monitor for a coroutine handler will be different than for a blocking handler, so monitor_set_cur() needs to be called in qmp_dispatch(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-7-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/qapi/qmp/dispatch.h')
-rw-r--r--include/qapi/qmp/dispatch.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h
index 5a9cf82472..0c2f467028 100644
--- a/include/qapi/qmp/dispatch.h
+++ b/include/qapi/qmp/dispatch.h
@@ -14,6 +14,7 @@
#ifndef QAPI_QMP_DISPATCH_H
#define QAPI_QMP_DISPATCH_H
+#include "monitor/monitor.h"
#include "qemu/queue.h"
typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);
@@ -49,7 +50,7 @@ const char *qmp_command_name(const QmpCommand *cmd);
bool qmp_has_success_response(const QmpCommand *cmd);
QDict *qmp_error_response(Error *err);
QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
- bool allow_oob);
+ bool allow_oob, Monitor *cur_mon);
bool qmp_is_oob(const QDict *dict);
typedef void (*qmp_cmd_callback_fn)(const QmpCommand *cmd, void *opaque);