Diff between b1b1db7dff294f8d6882b39937667ffc45ce70f9 and e157be921bb57fda91a2f2e62623ab39a205a031

Changed Files

File Additions Deletions Status
android/gatt.c +10 -0 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index ac45ffc..f39a66b 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -5530,6 +5530,8 @@ 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 */
@@ -5537,6 +5539,14 @@ static void handle_server_send_response(const void *buf, uint16_t len)
 			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.
 		 */