Diff between 8514068150759c1d6a46d4605d2351babfde1601 and e087e9693edb72f2cec8144bd5e83080515b8bc8

Changed Files

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

Full Patch

diff --git a/src/device.c b/src/device.c
index fd928fc..73bcc8f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4823,12 +4823,12 @@ bool device_attach_att(struct btd_device *dev, GIOChannel *io)
 	dst = device_get_address(dev);
 	ba2str(dst, dstaddr);
 
-	gatt_client_init(dev);
-	gatt_server_init(dev, btd_gatt_database_get_db(database));
-
 	if (gatt_db_isempty(dev->db))
 		load_gatt_db(dev, srcaddr, dstaddr);
 
+	gatt_client_init(dev);
+	gatt_server_init(dev, btd_gatt_database_get_db(database));
+
 	/*
 	 * Remove the device from the connect_list and give the passive
 	 * scanning another chance to be restarted in case there are