mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 16:20:24 +00:00
Fixes bug where the descriptor UUID16 was not set even thought it had one.
When deserializeing a characteristic_descriptor the UUID16 wouldn't be set even thought it had an 16 bit UUID. This adds check to see if the descriptor has a UUID16, if so, we read the UUID16 and set it to the gatt_client_characteristic_descriptor_t.
This commit is contained in:
parent
cbe54ab248
commit
b489552907
@ -1880,4 +1880,7 @@ void gatt_client_deserialize_characteristic(const uint8_t * packet, int offset,
|
||||
void gatt_client_deserialize_characteristic_descriptor(const uint8_t * packet, int offset, gatt_client_characteristic_descriptor_t * descriptor){
|
||||
descriptor->handle = little_endian_read_16(packet, offset);
|
||||
reverse_128(&packet[offset+2], descriptor->uuid128);
|
||||
if (uuid_has_bluetooth_prefix(descriptor->uuid128)){
|
||||
descriptor->uuid16 = big_endian_read_32(descriptor->uuid128, 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user