From: h.sandeep Date: Wed, 24 May 2017 22:35:39 +0000 (+0530) Subject: [Gatt-Client]: Fix Notification callback issue. X-Git-Tag: accepted/tizen/unified/20170613.194443~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F130907%2F2;p=platform%2Fupstream%2Fbluez.git [Gatt-Client]: Fix Notification callback issue. This patch fixes the notification callback issue when gatt client clone logic is used. Change-Id: I2f15256ab27dd401d93bdb49ae16199fed00bff5 Signed-off-by: h.sandeep --- diff --git a/src/gatt-client.c b/src/gatt-client.c index 9ed62cf..f72fbf2 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -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.