summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-11-08 22:31:22 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-11-08 22:31:22 +0200
commit0c9566f2c08ade96a1a6fe88b23e2f7c0f99cebe (patch)
treede3a3a998aa113cb6a9df647d89f8fcbcb8ac394
parent3870d6ab80711042b0c9224eac34293cb6b16aea (diff)
Check for HSP_HS_UUID in the probe callback
This change is needed since with the recent UUID matching changes e.g. the Headset AGW record would match HSP_HS_UUID since it contains it within the record.
-rw-r--r--input/manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/input/manager.c b/input/manager.c
index 9bf9f8a8..80c9b6b1 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -89,6 +89,12 @@ static int headset_probe(struct btd_device *device, GSList *uuids)
DBG("path %s", path);
+ if (!g_slist_find_custom(uuids, HSP_HS_UUID,
+ (GCompareFunc) strcasecmp))
+ return -EINVAL;
+
+ record = btd_device_get_record(device, uuids->data);
+
if (!record || sdp_get_access_protos(record, &protos) < 0) {
error("Invalid record");
return -EINVAL;