From d8e6a5e68d9224e759cbe7a7d1f05917243230f1 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 17 Aug 2023 15:31:08 -0700 Subject: [PATCH] device: Restart temporary timer while connecting If the device is temporary restart its timer when attempt to connect to it since it can interrupt the connection attempt prematurely while it still scanning, etc. --- src/device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/device.c b/src/device.c index 5f504a6..41d2d33 100644 --- a/src/device.c +++ b/src/device.c @@ -8820,6 +8820,10 @@ int device_connect_le(struct btd_device *dev) /* Keep this, so we can cancel the connection */ dev->att_io = io; + /* Restart temporary timer to give it time to connect/pair, etc. */ + if (dev->temporary) + set_temporary_timer(dev, btd_opts.tmpto); + return 0; } -- 2.7.4