Diff between a359a4c405c85818b4ea1f2fd6b1a06af2ad506f and 2b480bd5660bc27b9340118c87b47acbbc6e109d
Changed Files
| File | Additions | Deletions | Status |
| src/device.c | +8 | -0 | modified |
Full Patch
diff --git a/src/device.c b/src/device.c
index f59b6c1..df440ce 100644
--- a/src/device.c
+++ b/src/device.c
@@ -6028,6 +6028,14 @@ void device_bonding_complete(struct btd_device *device, uint8_t bdaddr_type,
if (status) {
device_cancel_authentication(device, TRUE);
+
+ /* Put the device back to the temporary state so that it will be
+ * treated as a newly discovered device.
+ */
+ if (!device_is_paired(device, bdaddr_type) &&
+ !device_is_trusted(device))
+ btd_device_set_temporary(device, true);
+
device_bonding_failed(device, status);
return;
}