From 1f0f3ca9ba5376e2034e5037667b0de594775573 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Wed, 12 Feb 2020 15:03:23 +0100 Subject: [PATCH] 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 --- subsys/bluetooth/host/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index a1917252904..02de3f00fe7 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -1889,13 +1889,13 @@ int bt_gatt_indicate(struct bt_conn *conn, /* Check if attribute is a characteristic then adjust the handle */ 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)) { return -EINVAL; } - handle = bt_gatt_attr_value_handle(params->attr); + handle = bt_gatt_attr_value_handle(attr); } if (conn) {