struct pending_op {
struct btd_device *device;
unsigned int id;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ uint8_t opcode;
+#endif
uint16_t offset;
uint8_t link_type;
struct gatt_db_attribute *attrib;
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
char dst_addr[18] = { 0 };
char *addr_value = dst_addr;
- gboolean response_needed = TRUE;
+ gboolean response_needed = FALSE;
if (device_get_rpa_exist(op->device) == true) {
ba2str(device_get_rpa(op->device), dst_addr);
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &addr_value);
dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT32, &op->id);
dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, &op->offset);
+ if (op->opcode == BT_ATT_OP_WRITE_REQ)
+ response_needed = TRUE;
dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &response_needed);
#endif
struct gatt_db_attribute *attrib,
unsigned int id,
const uint8_t *value, size_t len,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ uint8_t opcode,
+#endif
uint16_t offset, uint8_t link_type,
bool is_characteristic,
bool prep_authorize)
struct queue *owner_queue,
unsigned int id,
const uint8_t *value, size_t len,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ uint8_t opcode,
+#endif
uint16_t offset, uint8_t link_type,
bool is_characteristic,
bool prep_authorize)
struct pending_op *op;
op = pending_write_new(device, owner_queue, attrib, id, value, len,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ opcode,
+#endif
offset, link_type, is_characteristic,
prep_authorize);
retry:
send_write(op->device, op->attrib, chrc->proxy, NULL, op->id,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ op->data.iov_base, op->data.iov_len, 0, 0,
+#else
op->data.iov_base, op->data.iov_len, 0,
+#endif
op->link_type, false, false);
}
{
struct pending_op *op;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ op = pending_write_new(device, NULL, attrib, id, value, len, 0, 0,
+#else
op = pending_write_new(device, NULL, attrib, id, value, len, 0,
+#endif
link_type, false, false);
if (g_dbus_proxy_method_call(chrc->proxy, "AcquireWrite",
desc->req_prep_authorization)
send_write(device, attrib, desc->proxy,
desc->pending_writes, id, value, len,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ opcode,
+#endif
offset, bt_att_get_link_type(att),
false, true);
else
desc->prep_authorized = false;
if (send_write(device, attrib, desc->proxy, desc->pending_writes, id,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ value, len, opcode, offset, bt_att_get_link_type(att), false,
+#else
value, len, offset, bt_att_get_link_type(att), false,
+#endif
false))
return;
if (!device_is_trusted(device) && !chrc->prep_authorized &&
chrc->req_prep_authorization)
send_write(device, attrib, chrc->proxy, queue,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ id, value, len, opcode, offset,
+#else
id, value, len, offset,
+#endif
bt_att_get_link_type(att), true, true);
else
gatt_db_attribute_write_result(attrib, id, 0);
}
if (send_write(device, attrib, chrc->proxy, queue, id, value, len,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ opcode,
+#endif
offset, bt_att_get_link_type(att), false, false))
return;