fix(nimble): Handle auto connection flag for extended connect

This commit is contained in:
Rahul Tank
2024-03-18 15:57:39 +05:30
committed by Abhinav Kudnar
parent 72265e0a5b
commit e38c53b15d
+11 -2
View File
@@ -5727,8 +5727,17 @@ ble_gap_ext_connect(uint8_t own_addr_type, const ble_addr_t *peer_addr,
}
ble_conn_reattempt[reattempt_idx].own_addr_type = own_addr_type;
memcpy(&ble_conn_reattempt[reattempt_idx].peer_addr, peer_addr,
sizeof(ble_addr_t));
if (peer_addr != NULL) {
ble_conn_reattempt[reattempt_idx].peer_addr_present = 1;
memcpy(&ble_conn_reattempt[reattempt_idx].peer_addr, peer_addr,
sizeof(ble_addr_t));
} else {
ble_conn_reattempt[reattempt_idx].peer_addr_present = 0;
memset(&ble_conn_reattempt[reattempt_idx].peer_addr, 0,
sizeof(ble_addr_t));
}
ble_conn_reattempt[reattempt_idx].duration_ms = duration_ms;
if (phy_mask & BLE_GAP_LE_PHY_1M_MASK) {