public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] device: Remove GATT Attribute when device is removed
@ 2021-08-24 22:52 Luiz Augusto von Dentz
  2021-08-24 23:35 ` [BlueZ] " bluez.test.bot
  2021-08-25 17:44 ` [PATCH BlueZ] " David Lechner
  0 siblings, 2 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-08-24 22:52 UTC (permalink / raw)
  To: linux-bluetooth

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

This makes the GATT Attribute cache to be removed when device is removed
just like SDP ServiceRecords.

Fixes: https://github.com/bluez/bluez/issues/191
---
 src/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/device.c b/src/device.c
index 807106812..998485be7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4511,6 +4511,7 @@ static void device_remove_stored(struct btd_device *device)
 	key_file = g_key_file_new();
 	g_key_file_load_from_file(key_file, filename, 0, NULL);
 	g_key_file_remove_group(key_file, "ServiceRecords", NULL);
+	g_key_file_remove_group(key_file, "Attributes", NULL);
 
 	data = g_key_file_to_data(key_file, &length, NULL);
 	if (length > 0) {
-- 
2.31.1


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

end of thread, other threads:[~2021-08-25 22:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-24 22:52 [PATCH BlueZ] device: Remove GATT Attribute when device is removed Luiz Augusto von Dentz
2021-08-24 23:35 ` [BlueZ] " bluez.test.bot
2021-08-25 22:13   ` Luiz Augusto von Dentz
2021-08-25 17:44 ` [PATCH BlueZ] " David Lechner
2021-08-25 21:16   ` 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