Diff between 0d57a236bfe62d1f5f709ba8a62862087c9429fe and bc3f2cff83f56e0db55f6d6aa8cc6fc1962c5008

Changed Files

File Additions Deletions Status
src/device.c +5 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 1acecce..0da4184 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)) {