From ff1ef9316287059c4f40a3ab8d47eaf23170025e Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 7 Sep 2012 16:09:52 +0300 Subject: [PATCH] core: Remove pattern matching when probing services This code was only needed for the Serial interface for matching all RFCOMM-based records, and now that this interface is gone the code is also no-longer needed. --- src/device.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/device.c b/src/device.c index c65f0b7ba..02ef35e82 100644 --- a/src/device.c +++ b/src/device.c @@ -1257,27 +1257,6 @@ static gboolean record_has_uuid(const sdp_record_t *rec, return FALSE; } -static GSList *device_match_pattern(struct btd_device *device, - const char *match_uuid, - GSList *uuids) -{ - GSList *l, *match_uuids = NULL; - - for (l = uuids; l; l = l->next) { - char *uuid = l->data; - const sdp_record_t *rec; - - rec = btd_device_get_record(device, uuid); - if (!rec) - continue; - - if (record_has_uuid(rec, match_uuid)) - match_uuids = g_slist_append(match_uuids, uuid); - } - - return match_uuids; -} - static GSList *device_match_profile(struct btd_device *device, struct btd_profile *profile, GSList *uuids) @@ -1294,14 +1273,8 @@ static GSList *device_match_profile(struct btd_device *device, /* match profile uuid */ match = g_slist_find_custom(uuids, *uuid, bt_uuid_strcmp); - if (match) { + if (match) match_uuids = g_slist_append(match_uuids, match->data); - continue; - } - - /* match pattern driver */ - match = device_match_pattern(device, *uuid, uuids); - match_uuids = g_slist_concat(match_uuids, match); } return match_uuids; -- 2.47.3