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/17 04:04:04 UTC

[4/9] incubator-mynewt-core git commit: BLE Host - Don't restore bonding on enc. fail.

BLE Host - Don't restore bonding on enc. fail.


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/8b26f565
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8b26f565
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8b26f565

Branch: refs/heads/develop
Commit: 8b26f565f7f3b12b84b18f47b161ca0a2ababd96
Parents: 06e134c
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Jun 16 20:45:34 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Jun 16 20:49:26 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_gap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8b26f565/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index 25b043d..7c7ba7f 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -2254,7 +2254,7 @@ ble_gap_enc_event(uint16_t conn_handle, int status, int security_restored)
     ble_gap_call_event_cb(BLE_GAP_EVENT_ENC_CHANGE, &ctxt,
                           snap.cb, snap.cb_arg);
 
-    if (security_restored) {
+    if (status == 0 && security_restored) {
         BLE_HS_DBG_ASSERT(snap.desc.sec_state.bonded);
         ble_gatts_bonding_restored(conn_handle);
     }