diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-03-07 16:47:33 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-03-07 16:53:38 -0800 |
commit | 581aae6a2722e69479f4846e7b00c43fdf112b4c (patch) | |
tree | 4e52cafb7a2533e67f165e43fba3f4faf1c04bbb /src/device.c | |
parent | 96ab7296cb92705de8aabcdc14d81386b564d452 (diff) | |
download | bluez-581aae6a2722e69479f4846e7b00c43fdf112b4c.tar.gz |
device: Fix not always storing device info
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.
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index cb16d37c1..2b8e06c91 100644 --- a/src/device.c +++ b/src/device.c @@ -4158,7 +4158,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"); |