]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
smooth: fix resetting
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 8 Jun 2015 15:22:01 +0000 (17:22 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 8 Jun 2015 15:22:01 +0000 (17:22 +0200)
smooth.c

index e5c60f4e1eadd3ff8c00454780c5d8626c817a33..519b2ba217b16d540d5a7ebcaad8a59fd3e33d0b 100644 (file)
--- a/smooth.c
+++ b/smooth.c
@@ -266,13 +266,17 @@ SMT_GetOffset(struct timeval *now)
 void
 SMT_Reset(struct timeval *now)
 {
+  int i;
+
   if (!enabled)
     return;
 
-  locked = 1;
   smooth_offset = 0.0;
   smooth_freq = 0.0;
   last_update = *now;
+
+  for (i = 0; i < NUM_STAGES; i++)
+    stages[i].wander = stages[i].length = 0.0;
 }
 
 void