[PATCH v1 2/5] bap: Fix update of sink location value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pac->sink_loc needs to be updated only if there is a change.
---
 src/shared/bap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 925501c48d98..2fd21b81b72d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2491,13 +2491,11 @@ static void pacs_sink_location_changed(struct bt_pacs *pacs)
 
 static void pacs_add_sink_location(struct bt_pacs *pacs, uint32_t location)
 {
-	location |= pacs->sink_loc_value;
-
 	/* Check if location value needs updating */
 	if (location == pacs->sink_loc_value)
 		return;
 
-	pacs->sink_loc_value = location;
+	pacs->sink_loc_value |= location;
 
 	pacs_sink_location_changed(pacs);
 }
-- 
2.34.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux