From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If there is already a service for a given profile there is no point in probing it again. --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.c b/src/device.c index 1acecce33..0da4184f6 100644 --- a/src/device.c +++ b/src/device.c @@ -4202,6 +4202,7 @@ static struct btd_service *probe_service(struct btd_device *device, struct btd_profile *profile, GSList *uuids) { + GSList *l; struct btd_service *service; if (profile->device_probe == NULL) @@ -4210,6 +4211,10 @@ static struct btd_service *probe_service(struct btd_device *device, if (!device_match_profile(device, profile, uuids)) return NULL; + l = find_service_with_profile(device->services, profile); + if (l) + return l->data; + service = service_create(device, profile); if (service_probe(service)) { -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html