[PATCH 2/4] Add some debugging for virNetClient reference counting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

* src/rpc/virnetclient.c: Add debugging of ref counts
---
 src/rpc/virnetclient.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 9eaecfc..4a9eabc 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -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);
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]