andrzej-kaczmarek commented on a change in pull request #731: update
ble_ll_sched_adv_reschedule
URL: https://github.com/apache/mynewt-nimble/pull/731#discussion_r366734953
##########
File path: nimble/controller/src/ble_ll_sched.c
##########
@@ -961,20 +966,25 @@ ble_ll_sched_adv_reschedule(struct ble_ll_sched_item
*sch, uint32_t *start,
* with original duration.
*/
before = NULL;
- orig_start = sch->start_time;
+ sch->start_time = orig_start;
entry = start_overlap;
sch->end_time = sch->start_time + duration;
while (1) {
next_sch = entry->link.tqe_next;
if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
- rand_ticks = entry->start_time - sch->end_time;
- before = entry;
- TAILQ_INSERT_BEFORE(before, sch, link);
- break;
- } else {
- sch->start_time = entry->end_time;
- sch->end_time = sch->start_time + duration;
Review comment:
here we can indeed move `sch->start_time` beyond `orig_start_time +
max_delay_ticks` but this can only happen for last overlapping event which is
handled in the condition below.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services