]> xenbits.xensource.com Git - libvirt.git/commit
qemu: agent: handle agent connection errors in one place
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Wed, 16 Nov 2016 13:43:01 +0000 (16:43 +0300)
committerMaxim Nestratov <mnestratov@virtuozzo.com>
Wed, 23 Nov 2016 08:14:11 +0000 (11:14 +0300)
commit851ae08e3ee801c3570b72938982e9c67a00956c
treebd817deac25de188d7532ee7ffa95a79feaba896
parent01079727fe29dfeafac751a07e564e0d6bb53389
qemu: agent: handle agent connection errors in one place

qemuConnectAgent return -1 or -2 in case of different errors.
A. -1 is a case of unsuccessuful connection to guest agent.
B. -2 is a case of destoyed domain during connection attempt.

All qemuConnectAgent callers handle the first error the same way
so let's move this logic into qemuConnectAgent itself. Patched
function returns 0 in case A and -1 in case B.
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_process.c