From: Luiz Augusto von Dentz Date: Wed, 5 Apr 2023 22:53:12 +0000 (-0700) Subject: shared/ad: Fix bt_ad_has_data not matching when only type is passed X-Git-Tag: accepted/tizen/unified/20240117.163238~256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bed6b2931abafd9e51b43d962613e7cade71bb6a;p=platform%2Fupstream%2Fbluez.git shared/ad: Fix bt_ad_has_data not matching when only type is passed 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. --- diff --git a/src/shared/ad.c b/src/shared/ad.c index caf078c..b2bba95 100755 --- 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;