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:
Andrew Leech
2022-04-13 14:30:53 +02:00
committed by Szymon Janc
parent ebaeb57058
commit 327d9326e6
+3 -1
View File
@@ -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