Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c4e4e0e authored by Subramanian Srinivasan's avatar Subramanian Srinivasan Committed by Hemant Gupta
Browse files

GATT: Fix GATT error response for execute write

Usecaes:
Execute GATT/SR/GAW/BI-09C

Expected Result:
Test case passes

Observed Result:
Unable to pass the test cases

Root Cause:
Incorrect error response sent by DUT if there is no pending write request

Fix:
Send GATT_INVALID_OFFSET error when no pending write request

Test: GATT/SR/GAW/BI-09C passes

Bug: 80168519
Change-Id: I74e723ab0e39ce04e21f929a16dffcd996d1d23e
parent 4cb835de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ void gatt_process_exec_write_req(tGATT_TCB& tcb, uint8_t op_code,
  } else /* nothing needs to be executed , send response now */
  {
    LOG(ERROR) << "gatt_process_exec_write_req: no prepare write pending";
    gatt_send_error_rsp(tcb, GATT_ERROR, GATT_REQ_EXEC_WRITE, 0, false);
    gatt_send_error_rsp(tcb, GATT_INVALID_OFFSET, GATT_REQ_EXEC_WRITE, 0, false);
  }
}