提交 06c0d184 编写于 作者: D Daniel P. Berrange

Add some debugging for virNetClient reference counting

* src/rpc/virnetclient.c: Add debugging of ref counts
上级 97ee0953
......@@ -146,6 +146,7 @@ static virNetClientPtr virNetClientNew(virNetSocketPtr sock,
client) < 0)
VIR_DEBUG("Failed to add event watch, disabling events");
VIR_DEBUG("client=%p refs=%d", client, client->refs);
return client;
no_memory:
......@@ -214,6 +215,7 @@ void virNetClientRef(virNetClientPtr client)
{
virNetClientLock(client);
client->refs++;
VIR_DEBUG("client=%p refs=%d", client, client->refs);
virNetClientUnlock(client);
}
......@@ -226,6 +228,7 @@ void virNetClientFree(virNetClientPtr client)
return;
virNetClientLock(client);
VIR_DEBUG("client=%p refs=%d", client, client->refs);
client->refs--;
if (client->refs > 0) {
virNetClientUnlock(client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册