--- android/gatt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index f4cf569..eb99d54 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1148,6 +1148,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; -- 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