]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Flush filter when PPS refclock lost sync
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Nov 2009 16:03:04 +0000 (17:03 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Nov 2009 16:03:04 +0000 (17:03 +0100)
refclock.c

index 32fe3807aded69ccfdda2e8be3534451d1661c9d..32d3d3206aa193c6a6e727adf149368295823ed6 100644 (file)
@@ -324,6 +324,8 @@ RCL_AddPulse(RCL_Instance instance, struct timeval *pulse_time, double second)
     LOG(LOGS_INFO, LOGF_Refclock, "refclock pulse dropped second=%.9f sync=%d dist=%.9f",
         second, is_synchronised, distance);
 #endif
+    /* Drop also all stored samples */
+    filter_reset(&instance->filter);
     return 0;
   }