summaryrefslogtreecommitdiff
path: root/android/gatt.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2015-02-10 13:48:09 +0100
committerSzymon Janc <szymon.janc@tieto.com>2015-02-11 11:37:28 +0100
commitf34459d652db7c9ae3bc970e49ca1e7a920b6371 (patch)
treea5e5ba4dc5b5c6d7978c63bd2950c6ea90996d96 /android/gatt.c
parentbaa37c714fa454a6c106600dc998ced266c1a8f3 (diff)
downloadbluez-f34459d652db7c9ae3bc970e49ca1e7a920b6371.tar.gz
android/gatt: Remove redundant search
Searching for device is not needed since we have reference counting and device is there as long as app connection exist.
Diffstat (limited to 'android/gatt.c')
-rw-r--r--android/gatt.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/android/gatt.c b/android/gatt.c
index 13f4dfa53..3beb21b7c 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -914,14 +914,10 @@ static void destroy_connection(void *data)
if (conn->timeout_id > 0)
g_source_remove(conn->timeout_id);
- if (!queue_find(gatt_devices, match_by_value, conn->device))
- goto cleanup;
-
conn->device->conn_cnt--;
if (conn->device->conn_cnt == 0)
connection_cleanup(conn->device);
-cleanup:
queue_destroy(conn->transactions, free);
device_unref(conn->device);
free(conn);