projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2142499
)
shared/ad: Fix bt_ad_has_data not matching when only type is passed
author
Luiz Augusto von Dentz
<luiz.von.dentz@intel.com>
Wed, 5 Apr 2023 22:53:12 +0000
(15:53 -0700)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:41:34 +0000
(16:11 +0530)
bt_ad_has_data attempts to match the data portion even when not set
which is useful the user is only interested in actually mataching the
type alone.
src/shared/ad.c
patch
|
blob
|
history
diff --git
a/src/shared/ad.c
b/src/shared/ad.c
index
caf078c
..
b2bba95
100755
(executable)
--- a/
src/shared/ad.c
+++ b/
src/shared/ad.c
@@
-1022,6
+1022,9
@@
static bool data_match(const void *data, const void *user_data)
if (d1->type != d2->type)
return false;
+ if (!d2->len && !d2->data)
+ return true;
+
if (d1->len != d2->len)
return false;