You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2017/03/30 21:12:48 UTC

[31/37] incubator-mynewt-core git commit: MYNEWT-698: Unhandled exception in controller in ble_ll_conn_end

MYNEWT-698: Unhandled exception in controller in ble_ll_conn_end

Not sure what happened but only some of the fix was committed
in the prior commit. This is the actual fix for this issue.


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

Branch: refs/heads/nrf_cputime
Commit: 612f8efe462f27641cc4fd87993f7a3a079ec67b
Parents: 3538765
Author: William San Filippo <wi...@runtime.io>
Authored: Wed Mar 29 21:07:33 2017 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Wed Mar 29 21:07:33 2017 -0700

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll_conn.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/612f8efe/net/nimble/controller/src/ble_ll_conn.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_conn.c b/net/nimble/controller/src/ble_ll_conn.c
index 0ca72d0..171d938 100644
--- a/net/nimble/controller/src/ble_ll_conn.c
+++ b/net/nimble/controller/src/ble_ll_conn.c
@@ -2396,6 +2396,19 @@ init_rx_isr_exit:
     rxpdu = ble_ll_rxpdu_alloc(pyld_len + BLE_LL_PDU_HDR_LEN);
     if (rxpdu == NULL) {
         ble_phy_disable();
+
+        /*
+         * XXX: possible allocate the PDU when we start initiating?
+         * I cannot say I like this solution, but if we cannot allocate a PDU
+         * to hand up to the LL, we need to remove the connection we just
+         * scheduled since the connection state machine will not get processed
+         * by link layer properly. For now, just remove it from the scheduler
+         */
+        if (CONN_F_CONN_REQ_TXD(connsm) == 1) {
+            CONN_F_CONN_REQ_TXD(connsm) = 0;
+            ble_ll_sched_rmv_elem(&connsm->conn_sch);
+        }
+
         ble_phy_rx();
         rc = 0;
     } else {