adv_monitor: Clear any running DeviceLost timers on power down
authorManish Mandlik <mmandlik@google.com>
Fri, 10 Sep 2021 02:05:36 +0000 (19:05 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:36 +0000 (19:08 +0530)
commita2ced2e0583020a164eb1bb64029ff1e1f96938c
treed5626d492abed07eebff259154f528a037800d08
parent06b33910adde9606bd88749b8c8099d2b498cbe3
adv_monitor: Clear any running DeviceLost timers on power down

This patch clears any running Adv Monitor DeviceLost timers on bt power
down. It'll also invoke DeviceLost event if the device is already found
and is being tracked for the DeviceLost event.

Verified this by adding a monitor using bluetoothctl and confirming that
the DeviceLost event is getting triggered for already found device in
case of bt power down.

Reviewed-by: mcchou@google.com
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/adapter.c
src/adv_monitor.c
src/adv_monitor.h