From: Ayush Garg Date: Thu, 3 Dec 2020 11:16:44 +0000 (+0530) Subject: Add GATT Service handlers to GATT handle list X-Git-Tag: accepted/tizen/unified/20201218.124453~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fd66b3a5512adc1e06c312574b3ded848a0d803;p=platform%2Fcore%2Fapi%2Fbluetooth.git 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 --- 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); }