From: Miroslav Lichvar Date: Mon, 20 Dec 2010 13:12:47 +0000 (+0100) Subject: Don't forget to shift last class dispatch timevals on step X-Git-Tag: 1.25-pre1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59c68d240c0e1bb0837f21f43f9aa2b9ad389525;p=thirdparty%2Fchrony.git Don't forget to shift last class dispatch timevals on step --- diff --git a/sched.c b/sched.c index 9324e01e..39fa7d0a 100644 --- a/sched.c +++ b/sched.c @@ -496,7 +496,7 @@ handle_slew(struct timeval *raw, void *anything) { TimerQueueEntry *ptr; - struct timeval T1; + int i; if (is_step_change) { /* We're not interested in anything else - it won't affect the @@ -504,10 +504,12 @@ handle_slew(struct timeval *raw, occurs, just shift all the timeouts by the offset */ for (ptr = timer_queue.next; ptr != &timer_queue; ptr = ptr->next) { - UTI_AddDoubleToTimeval(&ptr->tv, -doffset, &T1); - ptr->tv = T1; + UTI_AddDoubleToTimeval(&ptr->tv, -doffset, &ptr->tv); } + for (i = 0; i < SCH_NumberOfClasses; i++) { + UTI_AddDoubleToTimeval(&last_class_dispatch[i], -doffset, &last_class_dispatch[i]); + } } }