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/05/17 20:52:12 UTC
[49/50] [abbrv] incubator-mynewt-core git commit: BLE Host - On
disconnect, call non-conn CBs first.
BLE Host - On disconnect, call non-conn CBs first.
The connection object should still be in existence when the GATT and SM
callbacks get executed. However, the connection object needs to be
deleted prior to the GAP callback, in case the app wants to reestablish
the connection.
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/62f66192
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/62f66192
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/62f66192
Branch: refs/heads/master
Commit: 62f66192780d28b0b4b5ccc8bc7fbb98a670d63c
Parents: 79f32b1
Author: Christopher Collins <cc...@apache.org>
Authored: Tue May 17 13:41:14 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue May 17 13:41:14 2016 -0700
----------------------------------------------------------------------
net/nimble/host/src/ble_gap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/62f66192/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 7dbbbac..22c95d0 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -496,10 +496,10 @@ ble_gap_conn_broken(struct ble_gap_snapshot *snap, int status)
{
struct ble_gap_conn_ctxt ctxt;
- ble_hs_atomic_conn_delete(snap->desc.conn_handle);
-
- ble_gattc_connection_broken(snap->desc.conn_handle);
ble_l2cap_sm_connection_broken(snap->desc.conn_handle);
+ ble_gattc_connection_broken(snap->desc.conn_handle);
+
+ ble_hs_atomic_conn_delete(snap->desc.conn_handle);
memset(&ctxt, 0, sizeof ctxt);
ctxt.desc = &snap->desc;