summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-07-01 17:24:15 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-07-06 13:42:19 +0300
commitecf2495781f735a7604df7d5d5b2d8ad5330c480 (patch)
tree9a5c42136bd8ebe56db4a20042b12054c9e4e415
parent91b1b67b95110c1c96d0ff0073c7114cfa153755 (diff)
downloadbluez-ecf2495781f735a7604df7d5d5b2d8ad5330c480.tar.gz
core/device: Don't persist private devices
Device which address is private should not be allowed to reset the temporary flag since its settings cannot be stored and the address may never be used again after disconnecting.
-rw-r--r--src/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 5506bc955..82704f8bb 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5141,6 +5141,9 @@ void btd_device_set_temporary(struct btd_device *device, bool temporary)
if (device->temporary == temporary)
return;
+ if (device_address_is_private(device))
+ return;
+
DBG("temporary %d", temporary);
device->temporary = temporary;