summaryrefslogtreecommitdiff
path: root/src/bluetooth-common.c
diff options
context:
space:
mode:
authorPyun DoHyun <dh79.pyun@samsung.com>2018-08-31 01:09:08 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2018-08-31 01:09:08 +0000
commite5d0903f2f5b89324d4d316037ab79c17aebb594 (patch)
treec12be5793c43cb23dd7b8586d68dafad196877e2 /src/bluetooth-common.c
parentcc628831b68d5c83c0275b4a734f1297dbe2c906 (diff)
parent326122da8376c5378f33313faa18bbec5b655fbe (diff)
downloadbluetooth-e5d0903f2f5b89324d4d316037ab79c17aebb594.tar.gz
bluetooth-e5d0903f2f5b89324d4d316037ab79c17aebb594.tar.bz2
bluetooth-e5d0903f2f5b89324d4d316037ab79c17aebb594.zip
Merge "Fixed the event for Gatt char changed value" into tizen
Diffstat (limited to 'src/bluetooth-common.c')
-rw-r--r--src/bluetooth-common.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c
index 5679d2f..b149d1d 100644
--- a/src/bluetooth-common.c
+++ b/src/bluetooth-common.c
@@ -1173,6 +1173,9 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
bt_pxp_property_changed_params_t *bt_pxp_property_info = NULL;
bluetooth_tds_activation_req_t *tds_act_req_info = NULL;
+#ifdef TIZEN_GATT_CLIENT
+ bt_gatt_char_property_t *char_prop = NULL;
+#endif
if (!__bt_need_to_handle(event))
return;
@@ -2218,15 +2221,29 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
}
#endif
case BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED:
+ BT_INFO("BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED");
+#ifdef TIZEN_GATT_CLIENT
+ char_prop = (bt_gatt_char_property_t*)(param->param_data);
+
+ if (char_prop == NULL)
+ return;
+ BT_INFO("Address [%s]", char_prop->address);
+ BT_INFO("Val len [%d]", char_prop->val_len);
+ BT_INFO("Event index [%d]", event_index);
+
+ ((_bt_gatt_client_val_changed_cb)bt_event_slot_container[event_index].callback)
+ (char_prop->prop.uuid, char_prop->address, char_prop->value, char_prop->val_len,
+ bt_event_slot_container[event_index].user_data);
+#else
char_val = (bt_gatt_char_value_t *)(param->param_data);
if (char_val == NULL)
return;
((_bt_gatt_client_value_changed_cb)bt_event_slot_container[event_index].callback)
- (char_val->char_handle, char_val->char_value, char_val->val_len,
- bt_event_slot_container[event_index].user_data);
-
+ (char_val->char_handle, char_val->char_value, char_val->val_len,
+ bt_event_slot_container[event_index].user_data);
+#endif
break;
#ifdef TIZEN_GATT_CLIENT
case BLUETOOTH_EVENT_GATT_READ_CHAR: