|
From: | Eric Blake |
Subject: | Re: [PATCH v6 05/12] qmp: Call monitor_set_cur() only in qmp_dispatch() |
Date: | Thu, 28 May 2020 13:42:11 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/28/20 10:37 AM, Kevin Wolf wrote:
The correct way to set the current monitor for a coroutine handler is different that for a blocking handler, so monitor_set_cur() can only be
s/that/than/
called in qmp_dispatch(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- include/qapi/qmp/dispatch.h | 3 ++- monitor/qmp.c | 7 +------ qapi/qmp-dispatch.c | 8 +++++++- qga/main.c | 2 +- stubs/monitor-core.c | 4 ++++ tests/test-qmp-cmds.c | 6 +++--- 6 files changed, 18 insertions(+), 12 deletions(-)
+++ b/stubs/monitor-core.c @@ -8,6 +8,10 @@ Monitor *monitor_cur(void) return NULL; }+void monitor_set_cur(Monitor *mon)+{ +} +
Should this stub assert(!mon)? Otherwise looks reasonable. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |