All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frédéric Danis" <frederic.danis@collabora.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/2] device: Reset svc_resolved on device_discover_services() request
Date: Wed, 16 Apr 2025 17:55:01 +0200	[thread overview]
Message-ID: <20250416155503.250763-1-frederic.danis@collabora.com> (raw)

This allows profiles requesting to re-retrieve the services records
(SDP or GATT) to be called back once the services are completed using
device_wait_for_svc_complete().
---
 src/device.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/device.c b/src/device.c
index 097b1fbba..ee9216a8e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5989,10 +5989,13 @@ int device_discover_services(struct btd_device *device)
 {
 	int err;
 
-	if (device->bredr)
+	if (device->bredr) {
+		device->bredr_state.svc_resolved = FALSE;
 		err = device_browse_sdp(device, NULL);
-	else
+	} else {
+		device->le_state.svc_resolved = FALSE;
 		err = device_browse_gatt(device, NULL);
+	}
 
 	if (err == 0 && device->discov_timer) {
 		timeout_remove(device->discov_timer);
-- 
2.43.0


             reply	other threads:[~2025-04-16 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 15:55 Frédéric Danis [this message]
2025-04-16 15:55 ` [PATCH BlueZ 2/2] input: device: Browse SDP records if not cached Frédéric Danis
2025-04-16 17:39 ` [BlueZ,1/2] device: Reset svc_resolved on device_discover_services() request bluez.test.bot
2025-04-24 17:06 ` bluez.test.bot

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=20250416155503.250763-1-frederic.danis@collabora.com \
    --to=frederic.danis@collabora.com \
    --cc=linux-bluetooth@vger.kernel.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.