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

Commit eeb9a515 authored by liuchao's avatar liuchao Committed by android-build-merger
Browse files

Merge "Fix a NULL-pointer check order reverse in GATTC_ConfigureMTU"

am: c085e4df

Change-Id: I07fb489e12c92fb3371fdeaaaa0225951985d48e
parents d024ee7b c085e4df
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -652,15 +652,15 @@ tGATT_STATUS GATTC_ConfigureMTU (uint16_t conn_id, uint16_t mtu)

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

    /* Validate that the link is BLE, not BR/EDR */
    if (p_tcb->transport != BT_TRANSPORT_LE)
    if ( (p_tcb == NULL) || (p_reg == NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
    {
        return GATT_ERROR;
        return GATT_ILLEGAL_PARAMETER;
    }

    if ( (p_tcb == NULL) || (p_reg==NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
    /* Validate that the link is BLE, not BR/EDR */
    if (p_tcb->transport != BT_TRANSPORT_LE)
    {
        return GATT_ILLEGAL_PARAMETER;
        return GATT_ERROR;
    }

    if (gatt_is_clcb_allocated(conn_id))