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

Commit 702ab3a9 authored by Mudumba Ananth's avatar Mudumba Ananth Committed by Andre Eisenbach
Browse files

Execute Write Response shall be sent after the attributes are written

Bug: 16560957
Change-Id: I085a2218644615bc13f5a0d0d78fc2afe0605a04
parent 55753001
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -782,8 +782,11 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)

    GATT_TRACE_API ("GATTC_ConfigureMTU conn_id=%d mtu=%d", conn_id, mtu );

    // Validate that the link is BLE, not BR/EDR
    // ????
    /* Validate that the link is BLE, not BR/EDR */
    if (p_tcb->transport != BT_TRANSPORT_LE)
    {
        return GATT_ERROR;
    }

    if ( (p_tcb == NULL) || (p_reg==NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
    {

system/stack/gatt/gatt_sr.c

100644 → 100755
+1 −6
Original line number Diff line number Diff line
@@ -379,12 +379,7 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
    else /* nothing needs to be executed , send response now */
    {
        GATT_TRACE_ERROR("gatt_process_exec_write_req: no prepare write pending");

        if ((p_buf = attp_build_sr_msg(p_tcb, GATT_RSP_EXEC_WRITE, NULL)) != NULL)
        {
            attp_send_sr_msg (p_tcb, p_buf);
        }

        gatt_send_error_rsp(p_tcb, GATT_ERROR, GATT_REQ_EXEC_WRITE, 0, FALSE);
    }
}