mwilliford closed pull request #47: Fixes issue with mpool in ble_ll_init, 
corrupted mpool linked list.
URL: https://github.com/apache/mynewt-nimble/pull/47
 
 
   

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 
b/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);
 
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
-    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);
+    }
 #endif
 }


 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to