Diff between c12323a5946a4d49c1197f5c7ac14cd22efbc2b6 and a5703d66d94d3f0f1796658276f012ad42caf726
Changed Files
| File | Additions | Deletions | Status |
| android/gatt.c | +4 | -0 | modified |
Full Patch
diff --git a/android/gatt.c b/android/gatt.c
index ad89233..ebda377 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -571,6 +571,10 @@ static void connection_cleanup(struct gatt_device *device)
bt_le_discovery_stop(NULL);
}
+ /* If device is not bonded service cache should be refreshed */
+ if (!bt_device_is_bonded(&device->bdaddr))
+ queue_remove_all(device->services, NULL, NULL, destroy_service);
+
device_set_state(device, DEVICE_DISCONNECTED);
}