Message ID | 20231002231311.3104749-3-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 65b53b0d3a8836eee6cff23518ef62c9409a301d |
Headers | show |
Series | [BlueZ,1/6] shared/csip: Fix returning invalid data to attribute Size reads | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
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;
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(-)