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

Commit 5b24bc5d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use the default LE connection timeout if the remote device has no preference"

parents 2c2e3edd 5f1fe8f4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1591,6 +1591,10 @@ void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint16_t ha
    if (max < BTM_BLE_CONN_INT_MIN_LIMIT)
        max = BTM_BLE_CONN_INT_MIN_LIMIT;

    // If the device has no preferred connection timeout, use the default.
    if (tout == BTM_BLE_CONN_PARAM_UNDEF)
        tout = BTM_BLE_CONN_TIMEOUT_DEF;

    tBTA_HH_DEV_CB *p_dev_cb = (tBTA_HH_DEV_CB*)data;
    BTM_BleSetPrefConnParams(p_dev_cb->addr, min, max, latency, tout);
    L2CA_UpdateBleConnParams(p_dev_cb->addr, min, max, latency, tout);