From: Harlan Stenn Date: Thu, 24 May 2001 03:43:35 +0000 (-0000) Subject: ChangeLog, aclocal.m4, configure, configure.in, ntp_loopfilter.c: X-Git-Tag: NTP_4_0_99_M~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83b1a1d8b4d1d2a6a7aecb9bfa9c1601e149eb3d;p=thirdparty%2Fntp.git ChangeLog, aclocal.m4, configure, configure.in, ntp_loopfilter.c: * configure.in: 4.0.99k39 * ntpd/ntp_loopfilter.c (local_clock): huffpuff cleanup/improvements. (huffpuff): Cleanup/improvements. (loop_config): huffpuff initialization cleanup/improvements. From: Dave Mills, Terje, Mark, and John? bk: 3b0c8367JD4KnepwkSZ22OAZHNL0Mw --- diff --git a/ChangeLog b/ChangeLog index d11bc8053..81a450005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-05-23 Harlan Stenn + + * configure.in: 4.0.99k39 + + * ntpd/ntp_loopfilter.c (local_clock): huffpuff cleanup/improvements. + (huffpuff): Cleanup/improvements. + (loop_config): huffpuff initialization cleanup/improvements. + From: Dave Mills, Terje, Mark, and John? + 2001-05-22 Harlan Stenn * html/release.htm: diff --git a/configure b/configure index 03d473ca0..a052a0fc7 100755 --- a/configure +++ b/configure @@ -1377,7 +1377,7 @@ fi # Define the identity of the package. PACKAGE=ntp -VERSION=4.0.99k38 +VERSION=4.0.99k39 cat >>confdefs.h <delay < - sys_huffpuff[sys_huffptr]) + if (peer->delay < sys_huffpuff[sys_huffptr]) sys_huffpuff[sys_huffptr] = peer->delay; - if (sys_mindly == 0 || peer->delay < sys_mindly) + if (peer->delay < sys_mindly) sys_mindly = peer->delay; if (fp_offset > 0) dtemp = -(peer->delay - sys_mindly) / 2; @@ -316,7 +315,7 @@ local_clock( #ifdef DEBUG if (debug) printf( - "local_clock: size %d mindly %.6f huffpuff %.6f\n", + "local_clock: size %d mindly %.6f huffpuff %.6f\n", sys_hufflen, sys_mindly, dtemp); #endif } @@ -776,10 +775,10 @@ huffpuff() if (sys_huffpuff == NULL) return; sys_huffptr = (sys_huffptr + 1) % sys_hufflen; - sys_huffpuff[sys_huffptr] = 0; - sys_mindly = 0; + sys_huffpuff[sys_huffptr] = 1e9; + sys_mindly = 1e9; for (i = 0; i < sys_hufflen; i++) { - if (sys_mindly == 0 || sys_huffpuff[i] < sys_mindly) + if (sys_huffpuff[i] < sys_mindly) sys_mindly = sys_huffpuff[i]; } } @@ -794,6 +793,7 @@ loop_config( double freq ) { + int i; switch (item) { @@ -931,7 +931,9 @@ loop_config( sys_hufflen = (int)(freq / HUFFPUFF); sys_huffpuff = (double *)emalloc(sizeof(double) * sys_hufflen); - memset(sys_huffpuff, 0, sizeof(double) * sys_hufflen); + for (i = 0; i < sys_hufflen; i++) + sys_huffpuff[i] = 1e9; + sys_mindly = 1e9; break; } }