aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2011-07-12 17:28:38 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-07-27 10:31:30 +0300
commit8fb640ef609595944e133690b6a00a472d3c5a8a (patch)
tree5796928fb36eb64b279edbfcb365b25d7d758452 /attrib/client.c
parente4a3edb1110ecd1bca644c39a5968e9f6a6cfa49 (diff)
downloadbluez-8fb640ef609595944e133690b6a00a472d3c5a8a.tar.gz
bluez-8fb640ef609595944e133690b6a00a472d3c5a8a.tar.xz
bluez-8fb640ef609595944e133690b6a00a472d3c5a8a.zip
Change GAttrib ref counting in Generic Attribute
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 7f0dac46..51775241 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -130,7 +130,6 @@ static void gatt_service_free(struct gatt_service *gatt)
g_slist_free_full(gatt->watchers, watcher_free);
g_slist_free_full(gatt->chars, characteristic_free);
g_free(gatt->path);
- g_attrib_unref(gatt->attrib);
btd_device_unref(gatt->dev);
dbus_connection_unref(gatt->conn);
g_free(gatt);
@@ -207,8 +206,6 @@ static void watcher_exit(DBusConnection *conn, void *user_data)
DBG("%s watcher %s exited", gatt->path, watcher->name);
gatt->watchers = g_slist_remove(gatt->watchers, watcher);
-
- g_attrib_unref(gatt->attrib);
}
static int characteristic_set_value(struct characteristic *chr,
@@ -579,7 +576,6 @@ static void update_char_desc(guint8 status, const guint8 *pdu, guint16 len,
}
}
- g_attrib_unref(gatt->attrib);
g_free(current);
}
@@ -605,7 +601,6 @@ static void update_char_format(guint8 status, const guint8 *pdu, guint16 len,
(void *) chr->format, sizeof(*chr->format));
done:
- g_attrib_unref(gatt->attrib);
g_free(current);
}
@@ -630,7 +625,6 @@ static void update_char_value(guint8 status, const guint8 *pdu,
}
}
- g_attrib_unref(gatt->attrib);
g_free(current);
}
@@ -684,11 +678,9 @@ static void descriptor_cb(guint8 status, const guint8 *pdu, guint16 plen,
qfmt->handle = handle;
if (uuid_desc16_cmp(&uuid, GATT_CHARAC_USER_DESC_UUID) == 0) {
- gatt->attrib = g_attrib_ref(gatt->attrib);
gatt_read_char(gatt->attrib, handle, 0, update_char_desc,
qfmt);
} else if (uuid_desc16_cmp(&uuid, GATT_CHARAC_FMT_UUID) == 0) {
- gatt->attrib = g_attrib_ref(gatt->attrib);
gatt_read_char(gatt->attrib, handle, 0,
update_char_format, qfmt);
} else
@@ -697,7 +689,6 @@ static void descriptor_cb(guint8 status, const guint8 *pdu, guint16 plen,
att_data_list_free(list);
done:
- g_attrib_unref(gatt->attrib);
g_free(current);
}
@@ -711,7 +702,6 @@ static void update_all_chars(gpointer data, gpointer user_data)
qdesc->gatt = gatt;
qdesc->chr = chr;
- gatt->attrib = g_attrib_ref(gatt->attrib);
gatt_find_info(gatt->attrib, chr->handle + 1, chr->end, descriptor_cb,
qdesc);
@@ -719,7 +709,6 @@ static void update_all_chars(gpointer data, gpointer user_data)
qvalue->gatt = gatt;
qvalue->chr = chr;
- gatt->attrib = g_attrib_ref(gatt->attrib);
gatt_read_char(gatt->attrib, chr->handle, 0, update_char_value, qvalue);
}
@@ -796,7 +785,6 @@ static void char_discovered_cb(GSList *characteristics, guint8 status,
fail:
g_dbus_send_message(gatt->conn, reply);
- g_attrib_unref(gatt->attrib);
g_free(current);
}