All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: linux-bluetooth@vger.kernel.org
Cc: David Lechner <david@lechnology.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Subject: [PATCH BlueZ v2 2/2] device: set le_state.svc_resolved = false in gatt_cache_cleanup()
Date: Wed, 25 Aug 2021 11:51:25 -0500	[thread overview]
Message-ID: <20210825165125.2675544-3-david@lechnology.com> (raw)
In-Reply-To: <20210825165125.2675544-1-david@lechnology.com>

When the GATT cache is cleared, there is no longer a list of GATT
services, so we need to set le_state.svc_resolved = false so that
the next time the device connects, it will enumerate the services
again.

This partially fixes an issue where the UUIDs D-Bus property was empty
after scanning, connecting, disconnecting and scanning again when
[GATT] Cache = yes is set in main.conf.

Issue: https://github.com/bluez/bluez/issues/192
Suggested-by: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Signed-off-by: David Lechner <david@lechnology.com>
---
 src/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/device.c b/src/device.c
index 53ef3e9a1..6d534c488 100644
--- a/src/device.c
+++ b/src/device.c
@@ -580,6 +580,7 @@ static void gatt_cache_cleanup(struct btd_device *device)
 
 	bt_gatt_client_cancel_all(device->client);
 	gatt_db_clear(device->db);
+	device->le_state.svc_resolved = false;
 }
 
 static void gatt_client_cleanup(struct btd_device *device)
-- 
2.25.1


      parent reply	other threads:[~2021-08-25 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 16:51 [PATCH BlueZ v2 0/2] device: fix advertising data UUIDs ignored when Cache = yes David Lechner
2021-08-25 16:51 ` [PATCH BlueZ v2 1/2] device: clear eir_uuids list on disconnect David Lechner
2021-08-25 17:16   ` device: fix advertising data UUIDs ignored when Cache = yes bluez.test.bot
2021-08-25 22:12   ` [PATCH BlueZ v2 1/2] device: clear eir_uuids list on disconnect Luiz Augusto von Dentz
2021-08-26  4:24     ` AW: " Eisenkolb Thomas
2021-08-26 16:47       ` David Lechner
2021-08-25 16:51 ` David Lechner [this message]

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=20210825165125.2675544-3-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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.