diff mbox series

[BlueZ,v1] shared/bap: Fix overwriting sink attribute

Message ID 20240801093010.144495-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1] shared/bap: Fix overwriting sink attribute | expand

Commit Message

Luiz Augusto von Dentz Aug. 1, 2024, 9:30 a.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When allocating the sink and sink_ccc attribute they were being
overwriten by source and source_ccc attributes.
---
 src/shared/bap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 48fa74edca1c..8147e037b6b9 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -559,14 +559,14 @@  static struct bt_pacs *pacs_new(struct gatt_db *db)
 					BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
 
 	bt_uuid16_create(&uuid, PAC_SOURCE_CHRC_UUID);
-	pacs->sink = gatt_db_service_add_characteristic(pacs->service, &uuid,
+	pacs->source = gatt_db_service_add_characteristic(pacs->service, &uuid,
 					BT_ATT_PERM_READ,
 					BT_GATT_CHRC_PROP_READ |
 					BT_GATT_CHRC_PROP_NOTIFY,
 					pacs_source_read, NULL,
 					pacs);
 
-	pacs->sink_ccc = gatt_db_service_add_ccc(pacs->service,
+	pacs->source_ccc = gatt_db_service_add_ccc(pacs->service,
 					BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
 
 	bt_uuid16_create(&uuid, PAC_SOURCE_LOC_CHRC_UUID);