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 <kw...@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


Reply via email to