Diff between 1106b28be85ac9586d1758839226e163e9030ee2 and 46a5d2beccb2ea73f28502950f52032cf4811d37

Changed Files

File Additions Deletions Status
src/device.c +4 -3 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 28b93eb..d270421 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5155,10 +5155,11 @@ static void gatt_client_init(struct btd_device *device)
 	g_attrib_attach_client(device->attrib, device->client);
 
 	/*
-	 * Notify notify existing service about the new connection so they can
-	 * react to notifications while discovering services
+	 * If we have cache, notify existing service about the new connection
+	 * so they can react to notifications while discovering services
 	 */
-	device_accept_gatt_profiles(device);
+	if (!gatt_db_isempty(device->db))
+		device_accept_gatt_profiles(device);
 
 	device->gatt_ready_id = bt_gatt_client_ready_register(device->client,
 							gatt_client_ready_cb,