You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/08/05 08:33:33 UTC

[mynewt-nimble] 02/02: nimble/ll: Fix assert on connection event end

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

commit 346a32053ed1f787c7beb8f605ace450996694bd
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Tue Aug 2 16:07:12 2022 +0200

    nimble/ll: Fix assert on connection event end
    
    This was missing in 16f1e4d7, i.e. since we now close connection event
    in that case, we should also allow to move to next conn event
    gracefully.
---
 nimble/controller/src/ble_ll_conn.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index ec758bff..564c6cf8 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -2817,20 +2817,6 @@ ble_ll_conn_event_end(struct ble_npl_event *ev)
     /* Better be a connection state machine! */
     connsm = (struct ble_ll_conn_sm *)ble_npl_event_get_arg(ev);
     BLE_LL_ASSERT(connsm);
-    if (connsm->conn_state == BLE_LL_CONN_STATE_IDLE) {
-        /* That should not happen. If it does it means connection
-         * is already closed.
-         * Make sure LL state machine is in idle
-         */
-        STATS_INC(ble_ll_conn_stats, sched_end_in_idle);
-        BLE_LL_ASSERT(0);
-
-        /* Just in case */
-        ble_ll_state_set(BLE_LL_STATE_STANDBY);
-
-        ble_ll_scan_chk_resume();
-        return;
-    }
 
     /* Log event end */
     ble_ll_trace_u32x2(BLE_LL_TRACE_ID_CONN_EV_END, connsm->conn_handle,