[PATCH 02/15] android/gatt: Add flag primary to struct service

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

 



Since we are going to use this struct also for included services lets
add here flag saying if this is primary service or not.
---
 android/gatt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index d7228a3..8b0833c 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -85,6 +85,7 @@ struct characteristic {
 struct service {
 	struct element_id id;
 	struct gatt_primary prim;
+	bool primary;
 
 	struct queue *chars;
 };
@@ -526,6 +527,8 @@ static void primary_cb(uint8_t status, GSList *services, void *user_data)
 
 		/* Put primary service to our local list */
 		memcpy(&p->prim, prim, sizeof(p->prim));
+		p->primary = true;
+
 		if (!queue_push_tail(dev->services, p)) {
 			error("gatt: Cannot push primary service to the list");
 			free(p);
-- 
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