Diff between 7664e160d8fe69e1ce6b48b6de5b3d3eb4db0d13 and 8e493e8416e5525042b8b4a34eb2b7084725438b

Changed Files

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

Full Patch

diff --git a/src/gatt-client.c b/src/gatt-client.c
index b4ca3b6..dd76a36 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -1688,6 +1688,12 @@ static void export_service(struct gatt_db_attribute *attr, void *user_data)
 
 static void create_services(struct btd_gatt_client *client)
 {
+	/* Don't attempt to create any objects if experimental is disabled */
+	if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+		info("GATT service objects disabled");
+		return;
+	}
+
 	DBG("Exporting objects for GATT services: %s", client->devaddr);
 
 	gatt_db_foreach_service(client->db, NULL, export_service, client);