diff mbox series

[BlueZ,3/6] shared/csip: Fix not always reading SIRK value

Message ID 20231002231311.3104749-3-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/6] shared/csip: Fix returning invalid data to attribute Size reads | expand

Commit Message

Luiz Augusto von Dentz Oct. 2, 2023, 11:13 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes sure the SIRK value is always read otherwise its value can
be outdated or not even read if the connection was interrupted before
read procedure was completed.
---
 src/shared/csip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/shared/csip.c b/src/shared/csip.c
index eb80bbc3b26c..85de63ea626b 100644
--- a/src/shared/csip.c
+++ b/src/shared/csip.c
@@ -597,7 +597,7 @@  static void foreach_csis_char(struct gatt_db_attribute *attr, void *user_data)
 		DBG(csip, "SIRK found: handle 0x%04x", value_handle);
 
 		csis = csip_get_csis(csip);
-		if (!csis || csis->sirk)
+		if (!csis)
 			return;
 
 		csis->sirk = attr;