You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by gi...@git.apache.org on 2017/10/10 07:00:20 UTC

[GitHub] sjanc commented on a change in pull request #608: nimble/ll: Fix scanning schedule for aux packets

sjanc commented on a change in pull request #608: nimble/ll: Fix scanning schedule for aux packets
URL: https://github.com/apache/mynewt-core/pull/608#discussion_r143643165
 
 

 ##########
 File path: net/nimble/controller/src/ble_ll_scan.c
 ##########
 @@ -912,6 +913,13 @@ ble_ll_scan_start(struct ble_ll_scan_sm *scansm)
     int phy;
 
     ble_ll_get_chan_to_scan(scansm, &scan_chan, &phy);
+
+    /* XXX: right now scheduled item is only present if we schedule for aux
+     *      scan just make sanity check that we have proper combination of
+     *      sch and resulting scan_chan
+     */
+    assert(!sch || scan_chan < BLE_PHY_ADV_CHAN_START);
+    assert(sch || scan_chan >= BLE_PHY_ADV_CHAN_START);
 
 Review comment:
   I'd make those assert like this:
   assert(sch && scan_chan < BLE_PHY_ADV_CHAN_START);
   assert(!sch && scan_chan >= BLE_PHY_ADV_CHAN_START);
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services