From 51251a711bf71fa4efb38a6da09d8ac040741cbc Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Tue, 8 Apr 2014 11:22:19 +0200 Subject: [PATCH] android/gatt: Add flag primary to struct service 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 d7228a385..8b0833c9a 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); -- 2.47.3