[aadk-commits] dbailey: uClinux/trunk r456 - /uClinux/trunk/uClinux-dist/user/ntp/ntpd/

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Wed May 30 11:36:08 MST 2007


Author: dbailey
Date: Wed May 30 13:36:08 2007
New Revision: 456

URL: http://svn.digium.com/view/aadk?view=rev&rev=456
Log:
Allow for local clock references to stabilize more quickly  (actually Less slowly)

Modified:
    uClinux/trunk/uClinux-dist/user/ntp/ntpd/ntp_proto.c

Modified: uClinux/trunk/uClinux-dist/user/ntp/ntpd/ntp_proto.c
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/user/ntp/ntpd/ntp_proto.c?view=diff&rev=456&r1=455&r2=456
==============================================================================
--- uClinux/trunk/uClinux-dist/user/ntp/ntpd/ntp_proto.c (original)
+++ uClinux/trunk/uClinux-dist/user/ntp/ntpd/ntp_proto.c Wed May 30 13:36:08 2007
@@ -1539,17 +1539,19 @@
 
 			/*
 			 * A peer leaves the island immediately if
-			 * unreachable, synchronized to us or suffers
+			 * unreachable, synchronized to us or is non-local and suffers
 			 * excessive root distance. Careful with the
 			 * root distance, since the poll interval can
 			 * increase to a day and a half.
 			 */ 
-			if (!peer->reach || (peer->stratum > 1 &&
-			    peer->refid ==
-			    peer->dstadr->sin.sin_addr.s_addr) ||
+			if (!peer->reach || 
+			    (peer->stratum > 1 &&
+			        peer->refid == peer->dstadr->sin.sin_addr.s_addr) ||
 			    peer->stratum >= STRATUM_UNSPEC ||
-			    (root_distance(peer) >= MAXDISTANCE + 2 *
-			    clock_phi * ULOGTOD(sys_poll)))
+			    (peer->refclktype != REFCLK_LOCALCLOCK &&
+			    	(root_distance(peer) >= MAXDISTANCE + 2 *
+			    	clock_phi * ULOGTOD(sys_poll)))
+			     )
 				continue;
 
 			/*



More information about the aadk-commits mailing list