summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyush Garg <ayush.garg@samsung.com>2020-12-03 16:46:44 +0530
committerAyush Garg <ayush.garg@samsung.com>2020-12-07 09:08:45 +0530
commit7fd66b3a5512adc1e06c312574b3ded848a0d803 (patch)
treec8b96c731fe807b45c55ce366c1c6c799be0ed73
parent6d0c1e15afdcd97b1af06bde8db0345a0d7f0d33 (diff)
downloadbluetooth-7fd66b3a5512adc1e06c312574b3ded848a0d803.tar.gz
bluetooth-7fd66b3a5512adc1e06c312574b3ded848a0d803.tar.bz2
bluetooth-7fd66b3a5512adc1e06c312574b3ded848a0d803.zip
Add GATT Service handlers to GATT handle list
At present, The validation check logic for GATT service handler is returning error in some GATT client role's APIs (ex. bt_gatt_get_uuid) because their handlers were not maintained in the 'gatt_handle_list'. This change will maintain such handlers. Change-Id: I39e35f6df7a5de7ea0e574d3ef4a71f1c67c074b Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
-rw-r--r--src/bluetooth-gatt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c
index 0f07527..da55e30 100644
--- a/src/bluetooth-gatt.c
+++ b/src/bluetooth-gatt.c
@@ -273,6 +273,9 @@ bt_gatt_h _bt_gatt_client_add_service(bt_gatt_client_h client,
client_s->services = g_slist_append(client_s->services, svc);
+ /* Add service to list of GATT handles */
+ gatt_handle_list = g_slist_append(gatt_handle_list, (gpointer)svc);
+
return svc;
}
#else
@@ -489,6 +492,9 @@ int _bt_gatt_client_update_include_services(bt_gatt_h service)
sec_property.char_handle.handle = NULL;
include_list = g_slist_append(include_list, sec_svc);
+
+ /* Add included service to list of GATT handles */
+ gatt_handle_list = g_slist_append(gatt_handle_list, (gpointer)sec_svc);
next:
bluetooth_gatt_free_service_property(&sec_property);
}