qmp: Assert that no other monitor is active
commit57d3635e42752289388b0a178fd636acbf3b90fa
authorKevin Wolf <kwolf@redhat.com>
Mon, 5 Oct 2020 15:58:46 +0000 (5 17:58 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 9 Oct 2020 05:08:19 +0000 (9 07:08 +0200)
treee499a0e23ae5db138ea4578ba2b2cc7a2ccee088
parentff04108a0e36e822519c517bd3bddbc1c7747c18
qmp: Assert that no other monitor is active

monitor_qmp_dispatch() is never supposed to be called in the context of
another monitor, so assert that monitor_cur() is NULL instead of saving
and restoring it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201005155855.256490-6-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>
monitor/qmp.c