Parent: e1432e7b8d09f557115d2537dc36f2fce76be209
Author: Yun-Hao Chung <howardchung@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2021-07-09 21:43:51
Tree: dddc9ba93520e86975219995031e5c785f5de3a6
src/adv_monitor: Remove checking in device lost timeout The time check in device lost timeout could cause DeviceLost never being reported because of the following reasons: 1. Timer created in timeout_add_seconds, which calls g_timeout_add_seconds_full internally, can be fired one second earlier than |timeout| seconds. 2. When handle_device_lost_timeout is invoked early, time diff between |curr_time| and |last_seen| could be less than |low_rssi_timeout|. In this case, since handle_device_lost always returns FALSE, the timer will be removed, but DeviceLost has not been reported yet. 3. If we never receives any advertisement from that peer since then, DeviceLost will never be reported. We can remove the checking in handle_device_lost_time because we restart or remove the timer whenever an advertisement is received. Reviewed-by: apusaka@chromium.org Reviewed-by: mcchou@chromium.org Reviewed-by: mmandlik@chromium.org
Diffstat
| M | src/adv_monitor.c | | | 27 | ++++++- - - - - - - - - - - - - - - - - - - - - |
1 files changed, 6 insertions(+), 21 deletions(-)