]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
In burst count only accumulated samples as good
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Jun 2013 11:05:26 +0000 (13:05 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Jun 2013 14:03:07 +0000 (16:03 +0200)
ntp_core.c

index e9ef711c79f4f37be13286e9ae3cca725ff45330..760bd59f3f6aa7883bea0847655eca727bcd6c02 100644 (file)
@@ -1068,7 +1068,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
 
   switch (inst->opmode) {
     case MD_BURST_WAS_ONLINE:
-      if (valid_data) {
+      if (valid_header && good_data) {
         --inst->burst_good_samples_to_go;
       }
 
@@ -1078,7 +1078,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
       break;
 
     case MD_BURST_WAS_OFFLINE:
-      if (valid_data) {
+      if (valid_header && good_data) {
         --inst->burst_good_samples_to_go;
       }