Linux-Bluetooth Archive on
 help / color / Atom feed
* [PATCH BlueZ] device: Don't mark services resolved on error
@ 2020-07-29  7:16 Niels Avonds
  0 siblings, 0 replies; only message in thread
From: Niels Avonds @ 2020-07-29  7:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Niels Avonds

This fixes a bug where the service UUIDs were not rediscovered after a
failed bonding attempt because the svc_resolved flag remained set even
though the uuids list was empty.
 src/device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index bb8e07e8f..e20c2d240 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2591,7 +2591,8 @@ static void device_svc_resolved(struct btd_device *dev, uint8_t browse_type,
 	DBG("%s err %d", dev->path, err);
-	state->svc_resolved = true;
+	if (err == 0)
+		state->svc_resolved = true;
 	/* Disconnection notification can happen before this function
 	 * gets called, so don't set svc_refreshed for a disconnected

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29  7:16 [PATCH BlueZ] device: Don't mark services resolved on error Niels Avonds

Linux-Bluetooth Archive on

Archives are clonable:
	git clone --mirror linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ \
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone