diff options
author | Manish Mandlik <mmandlik@google.com> | 2021-09-21 18:13:23 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-10-04 15:44:43 -0700 |
commit | cf4144ff47873598c263a23d3af9525676f0a9c2 (patch) | |
tree | 7651523972c386a2b1f312471e83a4fa13e34a3f /src/adv_monitor.c | |
parent | 61576a8e78c321d67412c6a49ef293c94ec8a235 (diff) | |
download | bluez-cf4144ff47873598c263a23d3af9525676f0a9c2.tar.gz |
adv_monitor: Mark the device as lost on device_lost_timeout
Mark the device as lost on device_lost_timeout so that it can be found
again next time.
Verified this by adding a monitor using bluetoothctl and confirming that
the DeviceLost event is getting triggered when bt peer stops advertising
and DeviceFound event gets triggered again when the bt peer restarts the
advertising.
Reviewed-by: Yun-Hao Chung <howardchung@google.com>
Diffstat (limited to 'src/adv_monitor.c')
-rw-r--r-- | src/adv_monitor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/adv_monitor.c b/src/adv_monitor.c index 963e4e75e..a3b33188b 100644 --- a/src/adv_monitor.c +++ b/src/adv_monitor.c @@ -1892,7 +1892,9 @@ static bool handle_device_lost_timeout(gpointer user_data) g_dbus_proxy_method_call(monitor->proxy, "DeviceLost", report_device_state_setup, NULL, dev->device, NULL); + dev->lost_timer = 0; + dev->found = false; return FALSE; } |