bt_gatt_find_by_uuid used bt_gatt_attr_value_handle but that function only works to get the value handle of a characteristic declaration, i.e. if the UUID is not BT_UUID_GATT_CHRC then it would always return handle = 0. This meant that bt_gatt_find_by_uuid would always use handle = 0 as the starting handle for non-BT_UUID_GATT_CHRC attributes, instead of the handle of the provided attr. This was not an issue for any UUIDs that may only exist once on a GATT server, which is most UUIDs, but for UUIDs like the BT_UUID_TBS_* UUIDs that may be multiple instances of, it would always return the first attribute rather than the one starting from the provided start attr. This commit also ensures that we do not overflow the `end_handle` when adding 2 uint16_t values. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| audio | ||
| common | ||
| controller | ||
| crypto | ||
| host | ||
| lib | ||
| mesh | ||
| services | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig.adv | ||
| Kconfig.logging | ||