You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2019/03/29 08:54:37 UTC
[mynewt-nimble] branch 1_1_0_dev updated: nimble/ll: Remove DTM
event from queue before erasing context
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch 1_1_0_dev
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/1_1_0_dev by this push:
new 2f7a8d5 nimble/ll: Remove DTM event from queue before erasing context
2f7a8d5 is described below
commit 2f7a8d5a5bbf3a1c4e62df35ce1e57d93508caf9
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Mar 28 23:11:24 2019 +0100
nimble/ll: Remove DTM event from queue before erasing context
If event is already queued, we should remove it from queue before
erasing context as otherwise callback and link will be removed which
leads to a crash when event is run,
---
nimble/controller/src/ble_ll_dtm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nimble/controller/src/ble_ll_dtm.c b/nimble/controller/src/ble_ll_dtm.c
index 31035ee..253a7e2 100644
--- a/nimble/controller/src/ble_ll_dtm.c
+++ b/nimble/controller/src/ble_ll_dtm.c
@@ -427,6 +427,7 @@ ble_ll_dtm_ctx_free(struct dtm_ctx * ctx)
OS_EXIT_CRITICAL(sr);
ble_ll_sched_rmv_elem(&ctx->sch);
+ ble_npl_eventq_remove(&g_ble_ll_data.ll_evq, &g_ble_ll_dtm_ctx.evt);
ble_phy_disable();
ble_phy_disable_dtm();