OSDN Git Service

Check for HSP_HS_UUID in the probe callback
authorJohan Hedberg <johan.hedberg@nokia.com>
Sat, 8 Nov 2008 20:31:22 +0000 (22:31 +0200)
committerJohan Hedberg <johan.hedberg@nokia.com>
Sat, 8 Nov 2008 20:31:22 +0000 (22:31 +0200)
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.

input/manager.c

index 9bf9f8a..80c9b6b 100644 (file)
@@ -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;