+* Dave Mills shifted some orphan processing.
* Fix typos in the [Bug 963] patch.
* bootstrap: squawk if genver fails. Use -f with cp in case Dave does a chown.
* Remove obsolete simulator command-line options.
extern int leap_tai;
extern u_long leap_expire;
extern u_long leap_sec;
+extern int sys_orphan;
+extern double sys_mindisp;
+extern double sys_maxdist;
/*
* there seems to be a bug in the IRIX 4 compiler which prevents
l_fp sys_authdelay; /* authentication delay */
static double sys_offset; /* current local clock offset */
static u_long sys_authdly[2]; /* authentication delay shift reg */
-static double sys_mindisp = MINDISPERSE; /* min disp increment (s) */
-static double sys_maxdist = MAXDISTANCE; /* selection threshold */
+double sys_mindisp = MINDISPERSE; /* min disp increment (s) */
+double sys_maxdist = MAXDISTANCE; /* selection threshold */
double sys_jitter; /* system jitter */
u_long sys_epoch; /* last clock update time */
static int sys_hopper; /* anticlockhop counter */
* server modes) and those that do (all other modes). The dance
* is intricate...
*/
- /*
- * Orphan mode is active when enabled and when no servers less
- * than the orphan statum are available. A server with no other
- * synchronization source is an orphan It shows offset zero and
- * reference ID the loopback address.
- */
hpoll = peer->hpoll;
- if (sys_orphan < STRATUM_UNSPEC && sys_peer == NULL) {
- sys_leap = LEAP_NOWARNING;
- sys_stratum = sys_orphan;
- sys_refid = htonl(LOOPBACKADR);
- sys_rootdelay = 0;
- sys_rootdisp = sys_mindisp;
- sys_offset = 0;
- }
-
/*
* In broadcast mode the poll interval is never changed from
* minpoll.
}
}
+ /*
+ * Orphan mode is active when enabled and when no servers less
+ * than the orphan statum are available. A server with no other
+ * synchronization source is an orphan It shows offset zero and
+ * reference ID the loopback address.
+ */
+ if (sys_orphan < STRATUM_UNSPEC && sys_peer == NULL) {
+ if (sys_leap == LEAP_NOTINSYNC)
+ sys_leap = LEAP_NOWARNING;
+ sys_stratum = sys_orphan;
+ if (sys_stratum > 1)
+ sys_refid = htonl(LOOPBACKADR);
+ else
+ memcpy(&sys_refid, "LOOP", 4);
+ sys_rootdelay = 0;
+ sys_rootdisp = sys_mindisp;
+ }
+
/*
* Leapseconds. When the time remaining decrements to zero,
* increment the TAI offset. If the kernel code is not available