device: Fix device can't be scanned for 5 mins after reboot
authorArchie Pusaka <apusaka@chromium.org>
Thu, 13 Jan 2022 07:46:52 +0000 (15:46 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:53 +0000 (14:55 +0530)
commit056cddcb4813389385cb1738f17b936101b20f29
treeff82a38dd15457e015fcd46b127e08cd2a93bb66
parent6bca0ef99fe67abb0ab1ee64b1f004953a2e78a8
device: Fix device can't be scanned for 5 mins after reboot

After the patches which limit the attempts of doing remote name
resolving, there's an issue which prevents BlueZ to RNR new devices
for 5 minutes after reboot. It's caused by failed_time is init to 0,
and is then treated as the timestamp when the device failed RNR.
However, actually there is no failure yet.

This patch fixes it by always allowing RNR when failed_time = 0.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/device.c