You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/06/15 02:27:36 UTC
[14/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Do key
exchange if only one side txes.
BLE Host - Do key exchange if only one side txes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ef291718
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ef291718
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ef291718
Branch: refs/heads/develop
Commit: ef291718a9c1ac4beabc286c15b8864836d85728
Parents: 0fea978
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Jun 8 15:05:28 2016 +0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Jun 14 19:23:35 2016 -0700
----------------------------------------------------------------------
net/nimble/host/src/ble_sm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ef291718/net/nimble/host/src/ble_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm.c b/net/nimble/host/src/ble_sm.c
index 27863a1..97ff226 100644
--- a/net/nimble/host/src/ble_sm.c
+++ b/net/nimble/host/src/ble_sm.c
@@ -1428,7 +1428,7 @@ ble_sm_pair_cfg(struct ble_sm_proc *proc)
ble_sm_key_dist(proc, &init_key_dist, &resp_key_dist);
if (proc->pair_req.authreq & BLE_SM_PAIR_AUTHREQ_BOND &&
proc->pair_rsp.authreq & BLE_SM_PAIR_AUTHREQ_BOND &&
- init_key_dist != 0 && resp_key_dist != 0) {
+ (init_key_dist != 0 || resp_key_dist != 0)) {
proc->flags |= BLE_SM_PROC_F_KEY_EXCHANGE;
}
@@ -2201,7 +2201,7 @@ ble_sm_enc_initiate(uint16_t conn_handle, uint8_t *ltk, uint16_t ediv,
res.state_arg = &cmd;
}
}
-
+
ble_hs_unlock();
ble_sm_process_result(conn_handle, &res);