andrzej-kaczmarek closed pull request #43: nimble/ll: Fix assertion when 
scheduling aux
URL: https://github.com/apache/mynewt-nimble/pull/43
 
 
   

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_adv.c 
b/nimble/controller/src/ble_ll_adv.c
index 9bb52de2..8a7d4f68 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -1147,15 +1147,19 @@ ble_ll_adv_aux_schedule_next(struct ble_ll_adv_sm 
*advsm)
     aux = AUX_CURRENT(advsm);
     aux_next = AUX_NEXT(advsm);
 
-    assert(aux->sch.enqueued);
     assert(!aux_next->sch.enqueued);
 
     /*
-     * In general we do not schedule next aux if current aux does not have
-     * AuxPtr in extended header as this means we do not need subsequent
-     * ADV_CHAIN_IND to be sent.
-     * However, if current aux is scannable we allow to schedule next aux as
-     * this will be 1st ADV_CHAIN_IND of scan response.
+     * Do not schedule next aux if current aux is no longer scheduled since we
+     * do not have reference time for scheduling.
+     */
+    if (!aux->sch.enqueued) {
+        return;
+    }
+
+    /*
+     * Do not schedule next aux if current aux does not have AuxPtr in extended
+     * header as this means we do not need subsequent ADV_CHAIN_IND to be sent.
      */
     if (!(aux->ext_hdr & (1 << BLE_LL_EXT_ADV_AUX_PTR_BIT))) {
         return;


 

----------------------------------------------------------------
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