qemu_agent: Add some more debug prints

for agent ref count and qemuProcessHandleAgentDestroy
This commit is contained in:
Michal Privoznik 2012-06-15 16:14:38 +02:00
parent 90a61b3940
commit c12d787eb0
2 changed files with 4 additions and 1 deletions

View File

@ -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);

View File

@ -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)