Merge branch 'bugfix/fix_blufi_encryption_fail_v4.4' into 'release/v4.4'

components/bt: fix blufi encryption fail(backport release/v4.4)

See merge request espressif/esp-idf!16314
This commit is contained in:
Jiang Jiang Jian 2021-12-23 03:23:24 +00:00
commit cb2906c7b2
2 changed files with 13 additions and 0 deletions

View File

@ -324,6 +324,12 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
blufi_env.conn_id = p_data->conn.conn_id;
blufi_env.recv_seq = blufi_env.send_seq = 0;
blufi_env.sec_mode = 0x0;
blufi_env.offset = 0;
if (blufi_env.aggr_buf != NULL) {
osi_free(blufi_env.aggr_buf);
blufi_env.aggr_buf = NULL;
}
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;

View File

@ -274,6 +274,13 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
blufi_env.is_connected = false;
blufi_env.recv_seq = blufi_env.send_seq = 0;
blufi_env.sec_mode = 0x0;
blufi_env.offset = 0;
if (blufi_env.aggr_buf != NULL) {
osi_free(blufi_env.aggr_buf);
blufi_env.aggr_buf = NULL;
}
btc_msg_t msg;
esp_blufi_cb_param_t param;