[Git][NTPsec/ntpsec][master] ntp_proto: once a PPS got selected, it never got unselected!

Gary E. Miller gitlab at mg.gitlab.com
Fri Sep 15 22:03:14 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
3722ee46 by Gary E. Miller at 2017-09-15T21:59:36Z
ntp_proto: once a PPS got selected, it never got unselected!

Now when a PPS source (like from the NMEA driver) goes invalid, and
the refclock was a selected PPS, it now gets set to discarded.

Related to issue #62.

- - - - -


1 changed file:

- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -2053,7 +2053,11 @@ clock_select(void)
 		sys_jitter = typesystem->jitter;
 		DPRINT(1, ("select: pps offset %.9f jitter %.9f\n",
 			   sys_offset, sys_jitter));
-	}
+	} else if ( typepps &&
+                    ( CTL_PST_SEL_PPS == typepps->new_status )) {
+                /* uh, oh, it WAS a valid PPS, but no longer */
+		typepps->status = CTL_PST_SEL_REJECT;
+        }
 #endif /* REFCLOCK */
 
 	/*



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/3722ee46e4696b8709de8d84b54ea3eb0508b875

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/3722ee46e4696b8709de8d84b54ea3eb0508b875
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/20170915/a661b29b/attachment.html>


More information about the vc mailing list