Bluetooth: GATT: Fix gatt indicate using wrong pointer for attribute
Fix bt_gatt_indicate using the wrong attribute pointer when a uuid was provided as input. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
378d6b137a
commit
1f0f3ca9ba
1 changed files with 2 additions and 2 deletions
|
@ -1889,13 +1889,13 @@ int bt_gatt_indicate(struct bt_conn *conn,
|
||||||
|
|
||||||
/* Check if attribute is a characteristic then adjust the handle */
|
/* Check if attribute is a characteristic then adjust the handle */
|
||||||
if (!bt_uuid_cmp(attr->uuid, BT_UUID_GATT_CHRC)) {
|
if (!bt_uuid_cmp(attr->uuid, BT_UUID_GATT_CHRC)) {
|
||||||
struct bt_gatt_chrc *chrc = params->attr->user_data;
|
struct bt_gatt_chrc *chrc = attr->user_data;
|
||||||
|
|
||||||
if (!(chrc->properties & BT_GATT_CHRC_INDICATE)) {
|
if (!(chrc->properties & BT_GATT_CHRC_INDICATE)) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = bt_gatt_attr_value_handle(params->attr);
|
handle = bt_gatt_attr_value_handle(attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn) {
|
if (conn) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue