]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Refactor and fix monitor checking
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2015 15:52:48 +0000 (17:52 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 16 Apr 2015 12:49:46 +0000 (14:49 +0200)
commitc44108522bea406a0e1a726807a687f313687a42
treea2f33486b365235d0088433ee71a5345c1235b3d
parent0c68ec7d78952028282cfc39dad76af00b457801
qemu: monitor: Refactor and fix monitor checking

Among all the monitor APIs some where checking if mon is NULL and some
were not. Since it's possible to have mon equal to NULL in case a second
call is attempted once entered the monitor. This requires that every
single API checks for the monitor.

This patch adds a macro that helps checking the state of the monitor and
either refactors existing checking code to use the macro or adds it in
case it was missing.
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h