Add service added event handling logic 19/224219/1
authorWootak Jung <wootak.jung@samsung.com>
Fri, 7 Feb 2020 04:38:10 +0000 (13:38 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 7 Feb 2020 05:48:28 +0000 (14:48 +0900)
Change-Id: Ib8d9db7a66ed7e286353dfc6eaa65f3cf66759e0

src/bluetooth-common.c

index bd0b715..ec4d77a 100644 (file)
@@ -2858,10 +2858,9 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 #ifdef TIZEN_GATT_CLIENT
                        BT_INFO("Service(%s) is added", service_change->uuid);
                        client->services_discovered = false;
-                       // TODO: Update for only added service
-                       ret = _bt_gatt_client_update_services(client);
-                       if (ret != BT_ERROR_NONE) {
-                               BT_ERR("_bt_gatt_client_update_services is failed");
+                       svc = _bt_gatt_client_add_service(client, service_change->uuid, service_change->inst_id);
+                       if (svc == NULL) {
+                               BT_ERR("_bt_gatt_client_add_service is failed");
                                break;
                        }
 #else