qemu: bulk stats: Fix logic in monitor handling
authorFrancesco Romani <fromani@redhat.com>
Thu, 11 Dec 2014 07:44:09 +0000 (08:44 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 11 Dec 2014 13:10:18 +0000 (14:10 +0100)
commita9638ae975a1c784d958e3fb2f0aab36b3ebddeb
tree7ebadb1fcc30827110ad69ddbc6f16fff74e5493
parenta20e818cb3f46d2dce586327dcc49ffcd82d94cb
qemu: bulk stats: Fix logic in monitor handling

A logic bug in qemuConnectGetAllDomainStats makes the code mark the
monitor as available when qemuDomainObjBeginJob fails, instead of when
it succeeds, as the correct flow requires.

This patch fixes the check and updates the code documentation
accordingly.

Broken by commit 57023c0a3af4af1c547189c1f6712ed5edeb0c0b.

Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit cb104ef734dfea12cb8826dba7e2c98912c4b7e1)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_driver.c