mwilliford closed pull request #47: Fixes issue with mpool in ble_ll_init, 
corrupted mpool linked list.

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/controller/src/ble_ll_scan.c 
index 8f835a1c..5cb39086 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -3105,11 +3105,13 @@ ble_ll_scan_init(void)
     assert(scansm->scan_req_pdu != NULL);
-    err = os_mempool_init(&ext_adv_pool,
-                          MYNEWT_VAL(BLE_LL_EXT_ADV_AUX_PTR_CNT),
-                          sizeof (struct ble_ll_aux_data),
-                          ext_adv_mem,
-                          "ble_ll_aux_scan_pool");
-    assert(err == 0);
+    if (ext_adv_pool.mp_membuf_addr != (uint32_t )ext_adv_mem) { // don't init 
this pool twice on reinit
+        err = os_mempool_init(&ext_adv_pool,
+                              MYNEWT_VAL(BLE_LL_EXT_ADV_AUX_PTR_CNT),
+                              sizeof(struct ble_ll_aux_data),
+                              ext_adv_mem,
+                              "ble_ll_aux_scan_pool");
+        assert(err == 0);
+    }


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to