mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add some debugging for virNetClient reference counting
* src/rpc/virnetclient.c: Add debugging of ref counts
This commit is contained in:
parent
97ee0953c6
commit
06c0d1841c
@ -146,6 +146,7 @@ static virNetClientPtr virNetClientNew(virNetSocketPtr sock,
|
|||||||
client) < 0)
|
client) < 0)
|
||||||
VIR_DEBUG("Failed to add event watch, disabling events");
|
VIR_DEBUG("Failed to add event watch, disabling events");
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p refs=%d", client, client->refs);
|
||||||
return client;
|
return client;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
@ -214,6 +215,7 @@ void virNetClientRef(virNetClientPtr client)
|
|||||||
{
|
{
|
||||||
virNetClientLock(client);
|
virNetClientLock(client);
|
||||||
client->refs++;
|
client->refs++;
|
||||||
|
VIR_DEBUG("client=%p refs=%d", client, client->refs);
|
||||||
virNetClientUnlock(client);
|
virNetClientUnlock(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,6 +228,7 @@ void virNetClientFree(virNetClientPtr client)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
virNetClientLock(client);
|
virNetClientLock(client);
|
||||||
|
VIR_DEBUG("client=%p refs=%d", client, client->refs);
|
||||||
client->refs--;
|
client->refs--;
|
||||||
if (client->refs > 0) {
|
if (client->refs > 0) {
|
||||||
virNetClientUnlock(client);
|
virNetClientUnlock(client);
|
||||||
|
Loading…
Reference in New Issue
Block a user