Thread (2 messages) flat view 2 messages, 2 authors, 2021-09-22
STALE1825d REVIEWED: 1 (0M)

1 review trailer.

[BlueZ PATCH v1] adv_monitor: Mark the device as lost on device_lost_timeout

From: Manish Mandlik <hidden>
Date: 2021-09-22 01:13:46
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

 src/adv_monitor.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/adv_monitor.c b/src/adv_monitor.c
index 715ac5904..a55e1ea2d 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;
 }
-- 
2.33.0.464.g1972c5931b-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help