diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-11-08 22:33:29 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-11-08 22:33:29 +0200 |
commit | 8c9833157e77514d5aacbb23752d30acd97d20f9 (patch) | |
tree | 45a41f58a2148d39799ee268249f9eff14f94b90 | |
parent | 0c9566f2c08ade96a1a6fe88b23e2f7c0f99cebe (diff) |
Remove duplicate call to btd_device_get_record
-rw-r--r-- | input/manager.c | 2 | ||||
-rw-r--r-- | src/device.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/input/manager.c b/input/manager.c index 80c9b6b1..bb0f6489 100644 --- a/input/manager.c +++ b/input/manager.c @@ -82,7 +82,7 @@ static int headset_probe(struct btd_device *device, GSList *uuids) { struct btd_adapter *adapter = device_get_adapter(device); const gchar *path = device_get_path(device); - const sdp_record_t *record = btd_device_get_record(device, uuids->data); + const sdp_record_t *record; sdp_list_t *protos; uint8_t ch; bdaddr_t src, dst; diff --git a/src/device.c b/src/device.c index cc1ede20..569f6128 100644 --- a/src/device.c +++ b/src/device.c @@ -639,8 +639,13 @@ static GSList *device_match_pattern(struct btd_device *device, if (!rec) continue; - if (record_has_uuid(rec, match_uuid)) + if (record_has_uuid(rec, match_uuid)) { + char bdaddr[18]; + ba2str(&device->bdaddr, bdaddr); + debug("Device %s record for profile %s matched uuid %s", + bdaddr, profile_uuid, match_uuid); uuids = g_slist_append(uuids, profile_uuid); + } } return uuids; @@ -661,13 +666,18 @@ static GSList *device_match_driver(struct btd_device *device, (GCompareFunc) strcasecmp); if (match) { uuids = g_slist_append(uuids, match->data); + debug("Profile UUID %s matched driver %s", *uuid, + driver->name); continue; } /* match pattern driver */ match = device_match_pattern(device, *uuid, profiles); - for (; match; match = match->next) + for (; match; match = match->next) { + debug("Non-profile UUID %s matched driver %s", *uuid, + driver->name); uuids = g_slist_append(uuids, match->data); + } } return uuids; |