Diff between e2e198ced468122df7b431cb06158123ba60a2f2 and ffcabd694c8d20e1da22fe6a66846a9241ee1717

Changed Files

File Additions Deletions Status
src/device.c +6 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index a4b5968..13159d9 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5684,6 +5684,10 @@ void btd_device_set_temporary(struct btd_device *device, bool temporary)
 		if (device->bredr)
 			adapter_whitelist_remove(device->adapter, device);
 		adapter_connect_list_remove(device->adapter, device);
+		if (device->auto_connect) {
+			device->disable_auto_connect = TRUE;
+			device_set_auto_connect(device, FALSE);
+		}
 		device->temporary_timer = g_timeout_add_seconds(main_opts.tmpto,
 							device_disappeared,
 							device);
@@ -6036,8 +6040,9 @@ void device_bonding_complete(struct btd_device *device, uint8_t bdaddr_type,
 		 * treated as a newly discovered device.
 		 */
 		if (!device_is_paired(device, bdaddr_type) &&
-				!device_is_trusted(device))
+				!device_is_trusted(device)) {
 			btd_device_set_temporary(device, true);
+		}
 
 		device_bonding_failed(device, status);
 		return;