From: Miroslav Lichvar Date: Wed, 23 Nov 2016 09:06:06 +0000 (+0100) Subject: ntp: fix calculation of PHC sample time X-Git-Tag: 3.0-pre1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a67dedad6288ae5782516af8537f8d6be7e10ea;p=thirdparty%2Fchrony.git ntp: fix calculation of PHC sample time --- diff --git a/ntp_io_linux.c b/ntp_io_linux.c index 349fe1e5..9cf791bf 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -336,7 +336,7 @@ get_phc_sample(int phc_fd, struct timespec *phc_ts, struct timespec *local_ts, d assert(n); UTI_AddDoubleToTimespec(&phc_tss[0], phc_sum / n, phc_ts); - UTI_AddDoubleToTimespec(&sys_tss[0], phc_sum / n, &ts1); + UTI_AddDoubleToTimespec(&sys_tss[0], local_sum / n, &ts1); LCL_CookTime(&ts1, local_ts, NULL); *p_delay = min_delay;