All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Mandlik <mmandlik@google.com>
To: luiz.dentz@gmail.com, marcel@holtmann.org
Cc: chromeos-bluetooth-upstreaming@chromium.org,
	linux-bluetooth@vger.kernel.org,
	Manish Mandlik <mmandlik@google.com>,
	Yun-Hao Chung <howardchung@google.com>
Subject: [BlueZ PATCH v1] adv_monitor: Mark the device as lost on device_lost_timeout
Date: Tue, 21 Sep 2021 18:13:23 -0700	[thread overview]
Message-ID: <20210921181243.BlueZ.v1.1.I261f9c1ee78b90f81a6c323c23065615be917c33@changeid> (raw)

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

 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


             reply	other threads:[~2021-09-22  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  1:13 Manish Mandlik [this message]
2021-09-22  2:29 ` [BlueZ,v1] adv_monitor: Mark the device as lost on device_lost_timeout bluez.test.bot
     [not found] ` <CAGPPCLDZF_BFbGV4Cd1s0SOKYJwwpM-cM3zvDdjHOTtBcvDT0Q@mail.gmail.com>
2021-10-04 22:47   ` [BlueZ PATCH v1] " Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210921181243.BlueZ.v1.1.I261f9c1ee78b90f81a6c323c23065615be917c33@changeid \
    --to=mmandlik@google.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=howardchung@google.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.