From e157be921bb57fda91a2f2e62623ab39a205a031 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Wed, 10 Dec 2014 10:57:07 +0100 Subject: [PATCH] android/gatt: Fix execute write request still pending For execute write no write callback is called thus we have to change its state directly in app's response handler. This fixes not sending execute write responses in TC_GAW_SR_BI_07_C. --- android/gatt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index ac45ffc6f..f39a66b52 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -5530,12 +5530,22 @@ static void handle_server_send_response(const void *buf, uint16_t len) } if (transaction->opcode == ATT_OP_EXEC_WRITE_REQ) { + struct pending_request *req; + conn->wait_execute_write = false; /* Check for execute response from all server applications */ if (pending_execute_write()) goto done; + /* + * This is usually done through db write callback but for + * execute write we dont have the attribute or handle to call + * gatt_db_attribute_write(). + */ + req = queue_peek_head(conn->device->pending_requests); + req->state = REQUEST_DONE; + /* * FIXME: Handle situation when not all server applications * respond with a success. -- 2.47.3