mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-18 11:17:54 +00:00
nimble/sm: Ensure bonded flag is set in sm_result on new pair & bond.
The bonded flag was not set on new connection in ble_gap_enc_event()
This commit is contained in:
committed by
Szymon Janc
parent
ebaeb57058
commit
327d9326e6
@@ -2041,14 +2041,16 @@ ble_sm_key_exch_success(struct ble_sm_proc *proc, struct ble_sm_result *res)
|
||||
/* The procedure is now complete. Update connection bonded state and
|
||||
* terminate procedure.
|
||||
*/
|
||||
int bonded = !!(proc->flags & BLE_SM_PROC_F_BONDING);
|
||||
ble_sm_update_sec_state(proc->conn_handle, 1,
|
||||
!!(proc->flags & BLE_SM_PROC_F_AUTHENTICATED),
|
||||
!!(proc->flags & BLE_SM_PROC_F_BONDING),
|
||||
bonded,
|
||||
proc->key_size);
|
||||
proc->state = BLE_SM_PROC_STATE_NONE;
|
||||
|
||||
res->app_status = 0;
|
||||
res->enc_cb = 1;
|
||||
res->bonded = bonded;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user