[Model] All
[BinType] AP
[Customer] OPEN
[Issue#] P200428-01509
[Request] Internal
[Occurrence Version] N/A
[Problem] bt-service access to the removed GATT service to get service information
[Cause & Measure] Whenever client app registered, duplicated service added to gatt_list_serice.
Eventhough GATT service removed from server, all of the duplicated service is not removed from the list.
So gatt_list_service should have a unique service for each device.
[Checking Method] n/a
[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change
Change-Id: If7898b33a572f4b446b04b5d788c6360c3e8fbab
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
hal_gattc_service_t* gatt_svc = NULL;
int i;
gchar *gp_char_path = NULL;
+ uint8_t uuid[BT_HAL_STACK_UUID_SIZE];
+
+ _bt_hal_convert_uuid_string_to_type(uuid, uuid_str);
+ gatt_svc = _gattc_find_service_from_uuid(conn_info, (bt_uuid_t *)uuid);
+ if (gatt_svc) {
+ DBG("Aleady added to gatt_list_services");
+ return;
+ }
/* add the service */
gatt_svc = _hal_gatt_client_add_service(conn_info, uuid_str, object_path, is_primary);