summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2021-08-25 11:51:25 -0500
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-08-25 15:11:27 -0700
commit1cbe923e920bacb625ce1e547666cc2735f24de9 (patch)
tree39ba9828cc3314f2276b001c111a9582609fa527 /src/device.c
parentc731508e2c3b9eab2da2293f32931f02d880ad3f (diff)
downloadbluez-1cbe923e920bacb625ce1e547666cc2735f24de9.tar.gz
device: set le_state.svc_resolved = false in gatt_cache_cleanup()
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>
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 2aa0295e7..26a01612a 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)