* Changes from Dave Mills:
+ Fix a corner case where a frequency update was reported but not set.
When LEAP_NOTINSYNC->LEAP_NOWARNING, call crypto_update() if we have
crypto_flags.
(4.2.5p125) 2008/08/18 Released by Harlan Stenn <stenn@ntp.org>
u_long clock_epoch; /* interval since last update */
u_int sys_tai; /* TAI offset from UTC */
static void rstclock (int, double); /* transition function */
-static void direct_freq(double); /* direct set frequency */
+static double direct_freq(double); /* direct set frequency */
static void set_freq(double); /* set frequency */
#ifdef KERNEL_PLL
if (clock_epoch < clock_minstep)
return (0);
- direct_freq(fp_offset);
+ clock_frequency = direct_freq(fp_offset);
/* fall through to S_SPIK */
if (clock_epoch < clock_minstep)
return (0);
- direct_freq(fp_offset);
+ clock_frequency = direct_freq(fp_offset);
rstclock(EVNT_SYNC, 0);
break;
* interval and residual frequency component. At the same time the
* frequenchy file is armed for update at the next hourly stats.
*/
-static void direct_freq(
+static double
+direct_freq(
double fp_offset
)
{
#endif /* KERNEL_PLL */
set_freq((fp_offset - clock_offset) / clock_epoch + drift_comp);
wander_resid = 0;
- return;
+ return (drift_comp);
}