Diff between f476e9d6cfe9a7d97d31e831725004195a12773b and 99f11aef6e94064b872eb4928ba0acad0b399217

Changed Files

File Additions Deletions Status
src/device.c +3 -0 modified
src/gatt-client.c +3 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index f13d9aa..0abed9b 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2483,6 +2483,9 @@ static void dev_probe_gatt(struct btd_profile *p, void *user_data)
 		return;
 	}
 
+	/* Mark service as claimed */
+	gatt_db_service_set_active(data->cur_attr, false);
+
 	data->dev->services = g_slist_append(data->dev->services, service);
 
 	if (data->all_services)
diff --git a/src/gatt-client.c b/src/gatt-client.c
index 809aca5..47faf86 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -1251,6 +1251,9 @@ static void export_service(struct gatt_db_attribute *attr, void *user_data)
 	struct btd_gatt_client *client = user_data;
 	struct service *service;
 
+	if (!gatt_db_service_get_active(attr))
+		return;
+
 	service = service_create(attr, client);
 	if (!service)
 		return;