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

Commit c23c0a09 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android (Google) Code Review
Browse files

Merge "LE: Fix problem where pending command is not sent after pairing" into lmp-dev

parents 3659ece0 ba08ab93
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -1497,13 +1497,15 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
            return;
        }

        /* service handle change void the response, discard it */
        if (p_clcb->auto_update == BTA_GATTC_DISC_WAITING)
        /* discard responses if service change indication is received before operation completed */
        if (p_clcb->auto_update == BTA_GATTC_DISC_WAITING && p_clcb->p_srcb->srvc_hdl_chg)
        {
            p_clcb->auto_update = BTA_GATTC_REQ_WAITING;
            bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
            APPL_TRACE_DEBUG("Discard all responses when service change indication is received.");
            p_data->op_cmpl.status = GATT_ERROR;
        }
        else if (op == GATTC_OPTYPE_READ)

        /* service handle change void the response, discard it */
        if (op == GATTC_OPTYPE_READ)
            bta_gattc_read_cmpl(p_clcb, &p_data->op_cmpl);

        else if (op == GATTC_OPTYPE_WRITE)
@@ -1514,6 +1516,12 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)

        else if (op == GATTC_OPTYPE_CONFIG)
            bta_gattc_cfg_mtu_cmpl(p_clcb, &p_data->op_cmpl);

        if (p_clcb->auto_update == BTA_GATTC_DISC_WAITING)
        {
            p_clcb->auto_update = BTA_GATTC_REQ_WAITING;
            bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
        }
    }
}
/*******************************************************************************
+2 −1
Original line number Diff line number Diff line
@@ -5878,9 +5878,10 @@ static char *btm_pair_state_descr (tBTM_PAIRING_STATE state)
** Parameters:      void
**
*******************************************************************************/
void btm_sec_dev_rec_cback_event (tBTM_SEC_DEV_REC *p_dev_rec, UINT8 res, BOOLEAN transport)
void btm_sec_dev_rec_cback_event (tBTM_SEC_DEV_REC *p_dev_rec, UINT8 res, BOOLEAN is_le_transport)
{
    tBTM_SEC_CALLBACK   *p_callback = p_dev_rec->p_callback;
    tBT_TRANSPORT transport = is_le_transport ? BT_TRANSPORT_LE : BT_TRANSPORT_BR_EDR;

    if (p_dev_rec->p_callback)
    {
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf)
*******************************************************************************/
void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB   *p_clcb, UINT8 sec_act)
{
    if (GKI_queue_is_empty(&p_clcb->p_tcb->pending_enc_clcb))
    if (p_clcb && p_clcb->p_tcb && GKI_queue_is_empty(&p_clcb->p_tcb->pending_enc_clcb))
        gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE);

    if (!sec_check_ok)