[Git][NTPsec/ntpsec][master] 2 commits: SHM: flip flag1 meaning. Default do not test SHM() limit

Gary E. Miller gitlab at mg.gitlab.com
Tue Jan 24 02:45:41 UTC 2017


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


Commits:
45897fca by Gary E. Miller at 2017-01-23T18:43:52-08:00
SHM: flip flag1 meaning.  Default do not test SHM() limit

Let the upper logic levels do the refclock selection.  Testing for
max clock offset breaks systems without an RTC, like RasPi.

- - - - -
6b57a468 by Gary E. Miller at 2017-01-23T18:45:23-08:00
NEWS; Mention SHM cahnge.

- - - - -


3 changed files:

- NEWS
- docs/driver_shm.txt
- ntpd/refclock_shm.c


Changes:

=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ on user-visible changes.
 
 == Repository Head ==
 
+The SHM refclok no longer limits the value of SHM time by default.
+This allows SHM to work on systems with no RTC by default.
+
 == 2016-12-30: 0.9.6 ==
 
 ntpkeygen has been moved from C to Python.  This is not a functional


=====================================
docs/driver_shm.txt
=====================================
--- a/docs/driver_shm.txt
+++ b/docs/driver_shm.txt
@@ -167,10 +167,10 @@ for the specific unit.
    Specifies the driver reference identifier, an ASCII string from one to
   four characters, with default +SHM+.
 +flag1 {0 | 1}+::
-   _Skip_ the difference limit check if set. Useful for systems where the
-   RTC backup cannot keep the time over long periods without power and the
-   SHM clock must be able to force long-distance initial jumps. _Check_ the
-   difference limit if cleared (default).
+   _Check_ the difference limit check if set. _Skip_ the difference limit
+   if not set (default).  There is really no need for this flag, just let
+   the upper level logic prune out false tickers.  NOTE:  this flag is
+   the opposite of flag1 in NTp Classic.
 +flag2 {0 | 1}+::
    Not used by this driver.
 +flag3 {0 | 1}+::


=====================================
ntpd/refclock_shm.c
=====================================
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -217,7 +217,7 @@ shm_control(
 	UNUSED_ARG(out_st);
 	if (NULL == up)
 		return;
-	if (pp->sloppyclockflag & CLK_FLAG1)
+	if (!(pp->sloppyclockflag & CLK_FLAG1))
 		up->max_delta = 0;
 	else if (pp->fudgetime2 < 1. || pp->fudgetime2 > 86400.)
 		up->max_delta = 4*3600;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/913da469f1aab623f7fbaeaaffb62f893ecbf6d2...6b57a4685998fd76c362e2cafc6b4f795368db72
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170124/edaf5def/attachment.html>


More information about the vc mailing list