From 5237734e5ca8f1a6f22725d6d8ae65e0cc384b2b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 4 Jan 2013 18:58:11 +0200 Subject: [PATCH] core: Fix up adapter ref count name and type --- src/adapter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 96e2f029e..e8a983afa 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -125,6 +125,8 @@ struct discovery { }; struct btd_adapter { + unsigned int ref_count; + uint16_t dev_id; uint32_t current_settings; @@ -163,8 +165,6 @@ struct btd_adapter { gboolean off_requested; /* DEVDOWN ioctl was called */ - gint ref; - GSList *pin_callbacks; GSList *drivers; @@ -1967,9 +1967,9 @@ static void adapter_free(gpointer user_data) struct btd_adapter *btd_adapter_ref(struct btd_adapter *adapter) { - adapter->ref++; + adapter->ref_count++; - DBG("%p: ref=%d", adapter, adapter->ref); + DBG("%p: ref_count=%u", adapter, adapter->ref_count); return adapter; } @@ -1978,11 +1978,11 @@ void btd_adapter_unref(struct btd_adapter *adapter) { gchar *path; - adapter->ref--; + adapter->ref_count--; - DBG("%p: ref=%d", adapter, adapter->ref); + DBG("%p: ref_count=%u", adapter, adapter->ref_count); - if (adapter->ref > 0) + if (adapter->ref_count > 0) return; if (!adapter->path) { -- 2.47.3