[PATCH 2/3] android/gatt: Fix execute write request still pending

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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.
 		 */
-- 
1.9.1

--
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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux