]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Reschedule fast slew timeout on offset change
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 24 Feb 2012 15:26:53 +0000 (16:26 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 24 Feb 2012 15:26:53 +0000 (16:26 +0100)
sys_linux.c

index 02cee9d4049e3ed0cd88c7a57d2f7389f80f72ea..4290e58aaa1b03ec48c5e963ef5be4622fca6841 100644 (file)
@@ -419,7 +419,8 @@ stop_fast_slew(void)
 }
 
 /* ================================================== */
-/* This routine reschedules fast slew timeout after frequency was changed */
+/* This routine reschedules fast slew timeout according
+   to the current frequency and offset */
 
 static void
 adjust_fast_slew(double old_tick, double old_delta_tick)
@@ -646,9 +647,9 @@ accrue_offset(double offset, double corr_rate)
 
   if (!fast_slewing) {
     initiate_slew();
-  } /* Otherwise, when the fast slew completes, any other stuff
-       in the offset register will be applied */
-
+  } else {
+    adjust_fast_slew(current_total_tick, delta_total_tick);
+  }
 }
 
 /* ================================================== */