[Gatt-Client]: Fix Notification callback issue. 07/130907/2
authorh.sandeep <h.sandeep@samsung.com>
Wed, 24 May 2017 22:35:39 +0000 (04:05 +0530)
committerSandeep Hattiholi <h.sandeep@samsung.com>
Wed, 24 May 2017 10:35:35 +0000 (10:35 +0000)
This patch fixes the notification callback issue
when gatt client clone logic is used.

Change-Id: I2f15256ab27dd401d93bdb49ae16199fed00bff5
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
src/gatt-client.c

index 9ed62cf..f72fbf2 100644 (file)
@@ -2109,8 +2109,16 @@ void btd_gatt_client_connected(struct btd_gatt_client *client)
        DBG("Device connected.");
 
        bt_gatt_client_unref(client->gatt);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       /* The Client data is not getting updated
+         * while clone logic is used, because of which
+        * the notification callbacks and other debug callbacks
+        * are not getting set properly, untill the clone logic
+        * is fixed, the ref logic is used */
+       client->gatt = bt_gatt_client_ref(gatt);
+#else
        client->gatt = bt_gatt_client_clone(gatt);
-
+#endif
        /*
         * Services have already been created before. Re-enable notifications
         * for any pre-registered notification sessions.