From 5079f6bbff9ae92fa0775516c40da2ce6ca55b54 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 3 Jun 2013 13:05:26 +0200 Subject: [PATCH] In burst count only accumulated samples as good --- ntp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntp_core.c b/ntp_core.c index e9ef711..760bd59 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -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; }