[Git][NTPsec/ntpsec][master] Tweak that may fix LOCKCLOCK=>lockclock glitch

Hal Murray gitlab at mg.gitlab.com
Mon Jan 21 02:20:08 UTC 2019


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
4a7d6dd0 by Hal Murray at 2019-01-21T02:19:05Z
Tweak that may fix LOCKCLOCK=>lockclock glitch

- - - - -


1 changed file:

- ntpd/ntp_loopfilter.c


Changes:

=====================================
ntpd/ntp_loopfilter.c
=====================================
@@ -114,8 +114,8 @@ bool lockclock;		/* hardware clock is externally disciplined? */
 /*
  * Program variables
  */
-static double clock_offset;	/* offset (lockclock case only) */
-static uptime_t clock_epoch;	/* last update (lockclock case only) */
+static double clock_offset;	/* offset (non-lockclock case only) */
+static uptime_t clock_epoch;	/* last update (non-lockclock case only) */
 double	clock_jitter;		/* offset jitter */
 double	drift_comp;		/* frequency (s/s) */
 static double init_drift_comp; /* initial frequency (PPM) */
@@ -1167,7 +1167,7 @@ huffpuff(void)
 /*
  * loop_config - configure the loop filter
  *
- * If lockclock is on, the LOOP_DRIFTINIT and LOOP_DRIFTCOMP cases are no-ops.
+ * If lockclock is on, the LOOP_DRIFTINIT case is a no-op.
  */
 void
 loop_config(
@@ -1186,7 +1186,7 @@ loop_config(
 	 * variables. Otherwise, continue leaving no harm behind.
 	 */
 	case LOOP_DRIFTINIT:
-		if (!lockclock || clock_ctl.mode_ntpdate)
+		if (lockclock || clock_ctl.mode_ntpdate)
 			break;
 
 		start_kern_loop();



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4a7d6dd048488e8df0a271aa2d73394631ebb79a

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4a7d6dd048488e8df0a271aa2d73394631ebb79a
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190121/d3d12bfd/attachment-0001.html>


More information about the vc mailing list