Diff between 7f58cd98890fbc4531ccb4aaa4bb1e8fb519d879 and 7c6628e6f299ca1d048b95bb124151d5dde9968f

Changed Files

File Additions Deletions Status
android/hal-gatt.c +5 -2 modified
android/hal-ipc-api.txt +3 -0 modified
android/hal-msg.h +3 -0 modified

Full Patch

diff --git a/android/hal-gatt.c b/android/hal-gatt.c
index 16b5607..e1faccb 100644
--- a/android/hal-gatt.c
+++ b/android/hal-gatt.c
@@ -1237,9 +1237,12 @@ static bt_status_t send_response(int conn_id, int trans_id, int status,
 	cmd->conn_id = conn_id;
 	cmd->trans_id = trans_id;
 	cmd->status = status;
-	cmd->len = sizeof(*response);
+	cmd->handle = response->attr_value.handle;
+	cmd->offset = response->attr_value.offset;
+	cmd->auth_req = response->attr_value.auth_req;
+	cmd->len = response->attr_value.len;
 
-	memcpy(cmd->data, response, sizeof(*response));
+	memcpy(cmd->data, response->attr_value.value, cmd->len);
 
 	return hal_ipc_cmd(HAL_SERVICE_ID_GATT,
 					HAL_OP_GATT_SERVER_SEND_RESPONSE,
diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index f9cf3e2..43e2709 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1828,6 +1828,9 @@ Commands and responses:
 
 		Command parameters: Connection ID (4 octets)
 		                    Transaction ID (4 octets)
+		                    Handle (2 octets)
+		                    Offset (2 octets)
+		                    Auth Request (1 octect)
 		                    Status (4 octets)
 		                    GATT Response (4 octets)
 		Response parameters: <none>
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 9d28866..09bd9a0 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -847,6 +847,9 @@ struct hal_cmd_gatt_server_send_indication {
 struct hal_cmd_gatt_server_send_response {
 	int32_t conn_id;
 	int32_t trans_id;
+	uint16_t handle;
+	uint16_t offset;
+	uint8_t auth_req;
 	int32_t status;
 	uint16_t len;
 	uint8_t data[0];