Skip to contentSkip to conversation

Fix repeated insertion of uuids when a device driver is matched

PATCH New Santiago Carot-Nemesio 1 participant 1 message May 22, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix repeated insertion of uuids when a device driver is matched

---
 src/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
src/device.c +3 -1
index 6ba1612..2b6b97f 100644
@@ -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;
Signature · 1 line
1.6.3.3