linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/8] core/device: Load stored attributes before initializing GATT client
@ 2016-09-12 14:07 Luiz Augusto von Dentz
  2016-09-12 14:07 ` [PATCH BlueZ 2/8] gap: Fix not handling accept properly Luiz Augusto von Dentz
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2016-09-12 14:07 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

During gatt_client_init service are requested to accept the connection
which may leads the driver to check existence of attributes.
---
 src/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-13 14:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 14:07 [PATCH BlueZ 1/8] core/device: Load stored attributes before initializing GATT client Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 2/8] gap: Fix not handling accept properly Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 3/8] gap: Make use of service user_data to store service context Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 4/8] gap: Implement disconnect callback Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 5/8] gap: Use shorter names for profile callback Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 6/8] deviceinfo: Fix not handling accept properly Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 7/8] deviceinfo: Implement disconnect callback Luiz Augusto von Dentz
2016-09-12 14:07 ` [PATCH BlueZ 8/8] deviceinfo: Use shorter names for profile callback Luiz Augusto von Dentz
2016-09-13 14:09 ` [PATCH BlueZ 1/8] core/device: Load stored attributes before initializing GATT client Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).