linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix repeated insertion of uuids when a device driver is matched
@ 2010-05-22 10:01 Santiago Carot-Nemesio
  0 siblings, 0 replies; only message in thread
From: Santiago Carot-Nemesio @ 2010-05-22 10:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Santiago Carot-Nemesio

---
 src/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/device.c b/src/device.c
index 6ba1612..2b6b97f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1085,7 +1085,9 @@ static GSList *device_match_driver(struct btd_device *device,
 		/* match pattern driver */
 		match = device_match_pattern(device, *uuid, profiles);
 		for (; match; match = match->next)
-			uuids = g_slist_append(uuids, match->data);
+			if (!g_slist_find_custom(uuids, match->data,
+					(GCompareFunc) strcasecmp))
+				uuids = g_slist_append(uuids, match->data);
 	}
 
 	return uuids;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-22 10:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 10:01 [PATCH] Fix repeated insertion of uuids when a device driver is matched Santiago Carot-Nemesio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).