Skip to content

Commit fd489a9

Browse files
committed
bluetooth: services: ras: rrsp: fix bt_gatt_find_by_uuid
bt_gatt_find_by_uuid implementation was updated so we need to search the full attribute table now, so use 0 instead of 1 to ensure this happens. Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
1 parent e4a9869 commit fd489a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/bluetooth/services/ras/rrsp/ras_rrsp.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static void ondemand_rd_indicate_sent_cb(struct bt_conn *conn,
477477
static int ondemand_rd_notify_or_indicate(struct bt_conn *conn, struct net_buf_simple *buf)
478478
{
479479
struct bt_gatt_attr *attr =
480-
bt_gatt_find_by_uuid(rrsp_svc.attrs, 1, BT_UUID_RAS_ONDEMAND_RD);
480+
bt_gatt_find_by_uuid(rrsp_svc.attrs, 0, BT_UUID_RAS_ONDEMAND_RD);
481481

482482
__ASSERT_NO_MSG(attr);
483483

@@ -512,7 +512,7 @@ static int ondemand_rd_notify_or_indicate(struct bt_conn *conn, struct net_buf_s
512512

513513
static int rascp_indicate(struct bt_conn *conn, struct net_buf_simple *rsp)
514514
{
515-
struct bt_gatt_attr *attr = bt_gatt_find_by_uuid(rrsp_svc.attrs, 1, BT_UUID_RAS_CP);
515+
struct bt_gatt_attr *attr = bt_gatt_find_by_uuid(rrsp_svc.attrs, 0, BT_UUID_RAS_CP);
516516

517517
__ASSERT_NO_MSG(attr);
518518

@@ -538,7 +538,7 @@ static int rascp_indicate(struct bt_conn *conn, struct net_buf_simple *rsp)
538538
static int rd_status_notify_or_indicate(struct bt_conn *conn, const struct bt_uuid *uuid,
539539
uint16_t ranging_counter)
540540
{
541-
struct bt_gatt_attr *attr = bt_gatt_find_by_uuid(rrsp_svc.attrs, 1, uuid);
541+
struct bt_gatt_attr *attr = bt_gatt_find_by_uuid(rrsp_svc.attrs, 0, uuid);
542542

543543
__ASSERT_NO_MSG(attr);
544544

@@ -617,7 +617,7 @@ static void rascp_cmd_handle(struct bt_ras_rrsp *rrsp)
617617
LOG_DBG("GET_RD %d", ranging_counter);
618618

619619
struct bt_gatt_attr *attr =
620-
bt_gatt_find_by_uuid(rrsp_svc.attrs, 1, BT_UUID_RAS_ONDEMAND_RD);
620+
bt_gatt_find_by_uuid(rrsp_svc.attrs, 0, BT_UUID_RAS_ONDEMAND_RD);
621621

622622
__ASSERT_NO_MSG(attr);
623623

0 commit comments

Comments
 (0)