[PATCH 05/16] android/gatt: Add tracking for autoconnect apps

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

 



Lets start to track which applications are interested in autoconnect
---
 android/gatt.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index aea0a9f..f526c16 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -164,6 +164,8 @@ struct gatt_device {
 	int ref;
 	int conn_cnt;
 
+	struct queue *autoconnect_apps;
+
 	struct queue *pending_requests;
 };
 
@@ -682,6 +684,7 @@ static void destroy_device(void *data)
 
 	queue_destroy(dev->services, destroy_service);
 	queue_destroy(dev->pending_requests, destroy_pending_request);
+	queue_destroy(dev->autoconnect_apps, NULL);
 
 	free(dev);
 }
@@ -724,6 +727,12 @@ static struct gatt_device *create_device(const bdaddr_t *addr)
 		return NULL;
 	}
 
+	dev->autoconnect_apps = queue_new();
+	if (!dev->autoconnect_apps) {
+		error("gatt: Failed to allocate memory for client");
+		destroy_device(dev);
+		return NULL;
+	}
 
 	dev->pending_requests = queue_new();
 	if (!dev->pending_requests) {
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux