provider: Add ref counting debug
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 24 Aug 2011 14:02:03 +0000 (17:02 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Sep 2011 09:40:46 +0000 (11:40 +0200)
src/provider.c

index 633ca40..bbd462e 100644 (file)
@@ -143,7 +143,7 @@ static void provider_unregister(struct connman_provider *provider)
 
 struct connman_provider *connman_provider_ref(struct connman_provider *provider)
 {
-       DBG("provider %p", provider);
+       DBG("provider %p refcount %d", provider, provider->refcount + 1);
 
        g_atomic_int_inc(&provider->refcount);
 
@@ -165,7 +165,7 @@ static void provider_destruct(struct connman_provider *provider)
 
 void connman_provider_unref(struct connman_provider *provider)
 {
-       DBG("provider %p", provider);
+       DBG("provider %p refcount %d", provider, provider->refcount - 1);
 
        if (g_atomic_int_dec_and_test(&provider->refcount) == FALSE)
                return;