From 018f00e6812a63d63c9994eadbe51f25e3fbad6f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 26 Oct 2015 10:48:23 +0200 Subject: [PATCH] core/device: Fix not claiming attributes of drivers Driver loaded during init do not call add_gatt_service since the attributes are only loaded during the first connection which means the attributes need to be claimed on add_gatt_service but it was returning if the driver was already probed causing the attribute to be exported over D-Bus. --- src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index eb1850e4a..672297614 100644 --- a/src/device.c +++ b/src/device.c @@ -3254,7 +3254,7 @@ static void add_gatt_service(struct gatt_db_attribute *attr, void *user_data) /* Check if service was already probed */ l = find_service_with_uuid(device->services, uuid_str); if (l) - return; + goto done; /* Add UUID and probe service */ btd_device_add_uuid(device, uuid_str); @@ -3264,6 +3264,7 @@ static void add_gatt_service(struct gatt_db_attribute *attr, void *user_data) if (!l) return; +done: /* Mark service as active to skip discovering it again */ gatt_db_service_set_active(attr, true); -- 2.47.3