Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8c0b673ea1b7e162bcac8e349d03cea > files > 16

ntp-4.2.2p1-15.el5_7.1.src.rpm

diff -up ntp-4.2.2p1/ntpd/cmd_args.c.kernel ntp-4.2.2p1/ntpd/cmd_args.c
--- ntp-4.2.2p1/ntpd/cmd_args.c.kernel	2006-06-06 22:16:38.000000000 +0200
+++ ntp-4.2.2p1/ntpd/cmd_args.c	2008-09-02 18:16:54.000000000 +0200
@@ -364,6 +364,7 @@ getCmdOpts(
 
 		    case 'x':
 			clock_max = 600;
+			kern_enable = 0;
 			break;
 #ifdef SIM
 		case 'B':
diff -up ntp-4.2.2p1/ntpd/ntp_loopfilter.c.kernel ntp-4.2.2p1/ntpd/ntp_loopfilter.c
--- ntp-4.2.2p1/ntpd/ntp_loopfilter.c.kernel	2008-09-02 17:26:25.000000000 +0200
+++ ntp-4.2.2p1/ntpd/ntp_loopfilter.c	2008-09-02 18:35:05.000000000 +0200
@@ -910,15 +910,15 @@ loop_config(
 		 * kernel to appear unsynchronized until the first
 		 * update is received.
 		 */
-		if (mode_ntpdate || clock_max > CLOCK_MAX)
+		if (mode_ntpdate)
 			break;
 
 		pll_control = 1;
 		memset(&ntv, 0, sizeof(ntv));
 #ifdef STA_NANO
-		ntv.modes = MOD_BITS | MOD_NANO;
+		ntv.modes = MOD_BITS | MOD_NANO | MOD_FREQUENCY;
 #else /* STA_NANO */
-		ntv.modes = MOD_BITS;
+		ntv.modes = MOD_BITS | MOD_FREQUENCY;
 #endif /* STA_NANO */
 		ntv.maxerror = MAXDISPERSE;
 		ntv.esterror = MAXDISPERSE;
@@ -1024,6 +1024,8 @@ loop_config(
 	 */
 	case LOOP_MAX:			/* step threshold */
 		clock_max = freq;
+		if (clock_max == 0 || clock_max > 0.5)
+			kern_enable = 0;
 		break;
 
 	case LOOP_PANIC:		/* panic threshold */