[ntp:bk-ntp-dev-send] BitKeeper diffs

stenn at whimsy.udel.edu stenn at whimsy.udel.edu
Wed Jul 17 07:35:21 UTC 2013


#### ChangeSet ####
2013-07-17 03:34:42-04:00, stenn at deacon.udel.edu
  [Bug 1466] Oncore should set FLAG_PPS

==== ChangeLog ====
2013-07-17 03:34:32-04:00, stenn at deacon.udel.edu +1 -0
  [Bug 1466] Oncore should set FLAG_PPS

--- 1.1305/ChangeLog	2013-07-07 02:34:48 -04:00
+++ 1.1306/ChangeLog	2013-07-17 03:34:32 -04:00
@@ -1,3 +1,4 @@
+* [Bug 1466] Oncore should set FLAG_PPS.
 (4.2.7p371) 2013/07/07 Released by Harlan Stenn <stenn at ntp.org>
 * CID 1042586: Check the return value of clock_gettime() in worker_sleep().
 * Upgrade to libopts-39.0.14 from 5.17.5pre10.

==== ntpd/refclock_oncore.c ====
2013-07-17 03:34:32-04:00, stenn at deacon.udel.edu +12 -3
  [Bug 1466] Oncore should set FLAG_PPS

--- 1.95/ntpd/refclock_oncore.c	2013-04-16 19:57:55 -04:00
+++ 1.96/ntpd/refclock_oncore.c	2013-07-17 03:34:32 -04:00
@@ -626,6 +626,7 @@ oncore_start(
 	instance->Ag = 0xff;		/* Satellite mask angle, unset by user */
 	instance->ant_state = ONCORE_ANTENNA_UNKNOWN;
 
+	peer->flags &= ~FLAG_PPS;	/* PPS not active yet */
 	peer->precision = -26;
 	peer->minpoll = 4;
 	peer->maxpoll = 4;
@@ -1593,8 +1594,6 @@ oncore_get_timestamp(
 	char Msg[160];
 
 	peer = instance->peer;
-	peer->flags &= ~FLAG_PPS;	/* default to off, set to on if we make
-					     it to the end of the routine. */
 
 #if 1
 	/* If we are in SiteSurvey mode, then we are in 3D mode, and we fall thru.
@@ -1609,13 +1608,16 @@ oncore_get_timestamp(
 
 	if ((instance->site_survey != ONCORE_SS_DONE) || (instance->mode != MODE_0D)) {
 #endif
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 
 	/* Don't do anything without an almanac to define the GPS->UTC delta */
 
-	if (instance->rsm.bad_almanac)
+	if (instance->rsm.bad_almanac) {
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
+	}
 
 	/* Once the Almanac is valid, the M12+T does not produce valid UTC
 	 * immediately.
@@ -1625,6 +1627,7 @@ oncore_get_timestamp(
 
 	if (instance->count5) {
 		instance->count5--;
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 
@@ -1635,6 +1638,7 @@ oncore_get_timestamp(
 	    &timeout) < 0) {
 		oncore_log_f(instance, LOG_ERR,
 			     "time_pps_fetch failed %m");
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 
@@ -1662,6 +1666,7 @@ oncore_get_timestamp(
 
 		if (pps_i.assert_sequence == j) {
 			oncore_log(instance, LOG_NOTICE, "ONCORE: oncore_get_timestamp, error serial pps");
+			peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 			return;
 		}
 
@@ -1690,6 +1695,7 @@ oncore_get_timestamp(
 
 		if (pps_i.clear_sequence == j) {
 			oncore_log(instance, LOG_ERR, "oncore_get_timestamp, error serial pps");
+			peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 			return;
 		}
 		instance->ev_serial = pps_i.clear_sequence;
@@ -1750,12 +1756,14 @@ oncore_get_timestamp(
 	if (time_pps_getcap(instance->pps_h, &current_mode) < 0) {
 		oncore_log_f(instance, LOG_ERR,
 			     "time_pps_getcap failed: %m");
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 
 	if (time_pps_getparams(instance->pps_h, &current_params) < 0) {
 		oncore_log_f(instance, LOG_ERR,
 			     "time_pps_getparams failed: %m");
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 
@@ -1865,6 +1873,7 @@ oncore_get_timestamp(
 
 	if (!refclock_process(instance->pp)) {
 		refclock_report(instance->peer, CEVNT_BADTIME);
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
 


More information about the bk-ntp-dev-send mailing list