Bluetooth: Fix bt_gatt_attr_read_chrc for UUID 128 bits
When reading a characteristic attribute which contain a 128 bits UUID the size of the elements were counting only the UUID alone not other fields that are part of the value causing invalid responses to be sent. Change-Id: I7474531f586ba19788eb9e0ed59555c5d7672176 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
58791718e1
commit
51f85ed6ab
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ int bt_gatt_attr_read_chrc(const bt_addr_le_t *peer,
|
|||
value_len += sizeof(pdu.uuid16);
|
||||
} else {
|
||||
memcpy(pdu.uuid, chrc->uuid->u128, sizeof(chrc->uuid->u128));
|
||||
value_len = sizeof(chrc->uuid->u128);
|
||||
value_len += sizeof(chrc->uuid->u128);
|
||||
}
|
||||
|
||||
return bt_gatt_attr_read(peer, attr, buf, len, offset, &pdu, value_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue