All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] device: Fix not always storing device info
@ 2023-03-08  0:51 Luiz Augusto von Dentz
  2023-03-08  0:51 ` [PATCH BlueZ 2/2] gatt: Fix creating duplicated objects Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-03-08  0:51 UTC (permalink / raw)
  To: linux-bluetooth

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

When updating the device address check if the device is marked as
temporary before attempting to call store_device_info otherwise it will
have no effect and instead btd_device_set_temporary must be called.
---
 src/device.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index df50ce7b4f6c..652c03606b9e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4412,7 +4412,10 @@ void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr,
 	bacpy(&device->bdaddr, bdaddr);
 	device->bdaddr_type = bdaddr_type;
 
-	store_device_info(device);
+	if (device->temporary)
+		btd_device_set_temporary(device, false);
+	else
+		store_device_info(device);
 
 	g_dbus_emit_property_changed(dbus_conn, device->path,
 						DEVICE_INTERFACE, "Address");
-- 
2.39.2


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

end of thread, other threads:[~2023-03-11  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08  0:51 [PATCH BlueZ 1/2] device: Fix not always storing device info Luiz Augusto von Dentz
2023-03-08  0:51 ` [PATCH BlueZ 2/2] gatt: Fix creating duplicated objects Luiz Augusto von Dentz
2023-03-08  2:19 ` [BlueZ,1/2] device: Fix not always storing device info bluez.test.bot
2023-03-11  0:40 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.