Thread (5 messages) flat view 5 messages, 3 authors, 2021-08-25
STALE1815d

[PATCH BlueZ] device: Remove GATT Attribute when device is removed

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-08-24 22:52:12
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help