gatt: Fix service_changed characteristic permission
authorArchie Pusaka <apusaka@chromium.org>
Tue, 21 Apr 2020 07:59:14 +0000 (15:59 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:48 +0000 (14:30 +0530)
According to bluetooth spec Ver 5.2, Vol 3, Part G, 7.1, the
service_changed characteristic is not readable. Therefore, this
patch marks it as such.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/gatt-database.c

index 52ee000..d298d29 100644 (file)
@@ -1416,7 +1416,7 @@ static void populate_gatt_service(struct btd_gatt_database *database)
 
        bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED);
        database->svc_chngd = gatt_db_service_add_characteristic(service, &uuid,
-                               BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_INDICATE,
+                               BT_ATT_PERM_NONE, BT_GATT_CHRC_PROP_INDICATE,
                                NULL, NULL, database);
 
        database->svc_chngd_ccc = service_add_ccc(service, database, NULL, NULL,