This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 77d0b3d nimble/host: Fix setting connection flags after pairing
77d0b3d is described below
commit 77d0b3d3f08d57685155e84ee4fa7004d7a74f18
Author: Andrzej Kaczmarek <[email protected]>
AuthorDate: Mon Jan 13 22:59:17 2020 +0100
nimble/host: Fix setting connection flags after pairing
---
nimble/host/src/ble_sm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c
index e2315fb..cfd80fc 100644
--- a/nimble/host/src/ble_sm.c
+++ b/nimble/host/src/ble_sm.c
@@ -2015,7 +2015,10 @@ 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.
*/
- ble_sm_update_sec_state(proc->conn_handle, 1, 0, 1, proc->key_size);
+ ble_sm_update_sec_state(proc->conn_handle, 1,
+ !!(proc->flags & BLE_SM_PROC_F_AUTHENTICATED),
+ !!(proc->flags & BLE_SM_PROC_F_BONDING),
+ proc->key_size);
proc->state = BLE_SM_PROC_STATE_NONE;
res->app_status = 0;