From 9b953c8757093b51eb86e6593d514e9839fd8d7d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 17 Nov 2008 17:55:26 -0300 Subject: Prevent duplicated uuids from being probed. Since probe takes the device object and the uuid list it make no sense to have duplicated uuid being probed, since the driver wouldn't detect any difference between them (fetching from the cache would return the very same record). --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.c b/src/device.c index 64d5c08d..04ebfd39 100644 --- a/src/device.c +++ b/src/device.c @@ -656,6 +656,11 @@ static GSList *device_match_driver(struct btd_device *device, for (uuid = driver->uuids; *uuid; uuid++) { GSList *match; + /* skip duplicated uuids */ + if (g_slist_find_custom(uuids, *uuid, + (GCompareFunc) strcasecmp)) + continue; + /* match profile driver */ match = g_slist_find_custom(profiles, *uuid, (GCompareFunc) strcasecmp); -- cgit