[PATCH BlueZ 1/3] shared/ad: Do not lookup service data twice

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

This remove call to bt_ad_has_service_data inside bt_ad_add_service_data
since it already does the lookup for existing data before.
---
 src/shared/ad.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/shared/ad.c b/src/shared/ad.c
index dfc6b9a..57f0a16 100644
--- a/src/shared/ad.c
+++ b/src/shared/ad.c
@@ -616,11 +616,6 @@ bool bt_ad_add_service_data(struct bt_ad *ad, const bt_uuid_t *uuid, void *data,
 
 	new_data->len = len;
 
-	if (bt_ad_has_service_data(ad, new_data)) {
-		uuid_destroy(new_data);
-		return false;
-	}
-
 	if (queue_push_tail(ad->service_data, new_data))
 		return true;
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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