for agent ref count and qemuProcessHandleAgentDestroy
---
src/qemu/qemu_agent.c | 3 ++-
src/qemu/qemu_process.c | 2 ++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index bc4ceff..36610c2 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -155,13 +155,14 @@ static void qemuAgentFree(qemuAgentPtr mon)
int qemuAgentRef(qemuAgentPtr mon)
{
mon->refs++;
+ VIR_DEBUG("%d", mon->refs);
return mon->refs;
}
int qemuAgentUnref(qemuAgentPtr mon)
{
mon->refs--;
-
+ VIR_DEBUG("%d", mon->refs);
if (mon->refs == 0) {
qemuAgentUnlock(mon);
qemuAgentFree(mon);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 544eed5..2b47bf6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -167,6 +167,8 @@ static void qemuProcessHandleAgentDestroy(qemuAgentPtr agent,
{
qemuDomainObjPrivatePtr priv;
+ VIR_DEBUG("Received destroy agent=%p vm=%p", agent, vm);
+
virDomainObjLock(vm);
priv = vm->privateData;
if (priv->agent == agent)
--
1.7.8.5