Diff between 32efc1bdbcb461a9419c95076146b9160acdc8e4 and 6e31be7dbe997c21c2a056e161370a92a4378206
Changed Files
| File | Additions | Deletions | Status |
| android/gatt.c | +8 | -0 | modified |
Full Patch
diff --git a/android/gatt.c b/android/gatt.c
index c1bd54d..b02245e 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1145,6 +1145,14 @@ static void handle_client_search_service(const void *buf, uint16_t len)
/*TODO: Handle filter uuid */
+ /* Use cache if possible */
+ if (!queue_isempty(dev->services)) {
+ status = HAL_STATUS_SUCCESS;
+ send_client_all_primary(GATT_SUCCESS, dev->services,
+ dev->conn_id);
+ goto reply;
+ }
+
if (!gatt_discover_primary(dev->attrib, NULL, primary_cb, dev)) {
status = HAL_STATUS_FAILED;
goto reply;