if (event_data->uuid_status.conn_status.status != OAL_STATUS_SUCCESS)
result = BLUETOOTH_ERROR_INTERNAL;
else {
+ BT_INFO("desc data len:", event_data->data_len);
if (event_data->data_len > 0) {
/* DEBUG */
for (i = 0; i < event_data->data_len; i++)
read_val,
event_data->data_len,
TRUE, NULL, NULL);
- /* SVC uuid */
- svc_uuid = g_memdup(&event_data->uuid_status.srvc_id.id.uuid.uuid[0], uuid_len);
+ } else {
+ BT_INFO("Descriptor Read success, but no data!!!");
- data_svc_uuid = g_variant_new_from_data(
+ data = g_variant_new_from_data(
G_VARIANT_TYPE_BYTESTRING,
- svc_uuid,
- 16,
- TRUE, NULL, NULL);
+ NULL,
+ 0,
+ FALSE, NULL, NULL);
+ }
+ /* SVC uuid */
+ svc_uuid = g_memdup(&event_data->uuid_status.srvc_id.id.uuid.uuid[0], uuid_len);
+
+ data_svc_uuid = g_variant_new_from_data(
+ G_VARIANT_TYPE_BYTESTRING,
+ svc_uuid,
+ 16,
+ TRUE, NULL, NULL);
- /* Char uuid */
- char_uuid = g_memdup(&event_data->uuid_status.char_id.uuid.uuid[0], uuid_len);
+ /* Char uuid */
+ char_uuid = g_memdup(&event_data->uuid_status.char_id.uuid.uuid[0], uuid_len);
- data_char_uuid = g_variant_new_from_data(
- G_VARIANT_TYPE_BYTESTRING,
- char_uuid,
- 16,
- TRUE, NULL, NULL);
+ data_char_uuid = g_variant_new_from_data(
+ G_VARIANT_TYPE_BYTESTRING,
+ char_uuid,
+ 16,
+ TRUE, NULL, NULL);
- /* Desc uuid */
- desc_uuid = g_memdup(&event_data->uuid_status.descr_id.uuid.uuid[0], uuid_len);
+ /* Desc uuid */
+ desc_uuid = g_memdup(&event_data->uuid_status.descr_id.uuid.uuid[0], uuid_len);
- data_desc_uuid = g_variant_new_from_data(
- G_VARIANT_TYPE_BYTESTRING,
- desc_uuid,
- 16,
- TRUE, NULL, NULL);
+ data_desc_uuid = g_variant_new_from_data(
+ G_VARIANT_TYPE_BYTESTRING,
+ desc_uuid,
+ 16,
+ TRUE, NULL, NULL);
- param = g_variant_new("(isn@ayin@ayin@ayin@ay)", result,
- conn_info->addr,
- uuid_len,
- data_svc_uuid,
- event_data->uuid_status.srvc_id.id.inst_id,
- 16,
- data_char_uuid,
- event_data->uuid_status.char_id.inst_id,
- 16,
- data_desc_uuid,
- event_data->uuid_status.descr_id.inst_id,
- event_data->data_len,
- data);
+ param = g_variant_new("(isn@ayin@ayin@ayin@ay)", result,
+ conn_info->addr,
+ uuid_len,
+ data_svc_uuid,
+ event_data->uuid_status.srvc_id.id.inst_id,
+ 16,
+ data_char_uuid,
+ event_data->uuid_status.char_id.inst_id,
+ 16,
+ data_desc_uuid,
+ event_data->uuid_status.descr_id.inst_id,
+ event_data->data_len,
+ data);
- /* Send Event */
- _bt_send_event(BT_GATT_CLIENT_EVENT,
+ /* Send Event */
+ _bt_send_event(BT_GATT_CLIENT_EVENT,
BLUETOOTH_EVENT_GATT_READ_DESC,
param);
- } else {
- BT_ERR("Descriptor Read success, but no data!!!");
- result = BLUETOOTH_ERROR_INTERNAL;
- }
}
BT_INFO("Send DBUS rpely for GATT Read Descriptor");
/* Send DBUS return */