From: Amit Purwar Date: Thu, 24 Jan 2019 13:24:43 +0000 (+0530) Subject: Fixed gatt notification changed callback X-Git-Tag: submit/tizen/20190129.000858~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a53681d7c1e80d55cb9d9227237c29f11bcc4a3e;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fixed gatt notification changed callback Change-Id: I8e9041c56bbfe740c2502a2c3d9c216d7ddf31ca Signed-off-by: Amit Purwar --- diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 6f62ed5..57faf14 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -900,8 +900,8 @@ static bt_gatt_server_characteristic_notification_state_changed_cb bt_gatt_characteristic_s *chr = l3->data; if (chr && chr->handle == handle) { - if (chr->notified_cb) { - *user_data = chr->notified_user_data; + if (chr->notification_changed_cb) { + *user_data = chr->notification_changed_user_data; *char_handle = (bt_gatt_h*) chr; *server = serv; return chr->notification_changed_cb; @@ -2587,8 +2587,10 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us cb = __bt_gatt_attribute_get_notification_change_cb(&server_handle, notif_info->handle, &char_handle, &user_data_cfm); - if (cb == NULL) + if (cb == NULL) { + BT_INFO("cb is NULL"); return; + } cb(notif_info->notification, server_handle, char_handle, user_data_cfm); #else