With this patch GATT is aware about unpaired devices so the local cache can be cleared --- android/gatt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index 89748d2..9dcac0b 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -6496,6 +6496,22 @@ static bool start_listening(void) return true; } +static void gatt_unpaired_cb(const bdaddr_t *addr) +{ + struct gatt_device *dev; + char address[18]; + + dev = find_device_by_addr(addr); + if (!dev) + return; + + ba2str(addr, address); + DBG("Unpaired device %s", address); + + queue_remove(gatt_devices, dev); + destroy_device(dev); +} + bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr) { DBG(""); @@ -6541,6 +6557,8 @@ bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr) info("gatt: LE: %s BR/EDR: %s", le_io ? "enabled" : "disabled", bredr_io ? "enabled" : "disabled"); + bt_unpaired_register(gatt_unpaired_cb); + return true; failed: -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html