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

Harlan Stenn stenn at whimsy.udel.edu
Sun Feb 4 19:51:56 PST 2007


#### ChangeSet ####
2007-02-04 21:51:15-05:00, mayer at pogo.udel.edu 
  Bug #586 Don't do lookups if AI_NUMERICHOST is set

==== libntp/ntp_rfc2553.c ====
2007-02-04 21:51:01-05:00, mayer at pogo.udel.edu +6 -0
  Bug #586 Don't do lookups if AI_NUMERICHOST is set

--- 1.36/libntp/ntp_rfc2553.c	2006-09-19 01:08:43 -04:00
+++ 1.37/libntp/ntp_rfc2553.c	2007-02-04 21:51:01 -05:00
@@ -394,6 +394,12 @@ do_nodename(
 	}
 
 	/*
+	 * If the numeric host flag is set, don't attempt resolution
+	 */
+	if (hints != NULL && (hints->ai_flags & AI_NUMERICHOST))
+		return (EAI_NONAME);
+
+	/*
 	 * Look for a name
 	 */
 

#### ChangeSet ####
2007-02-04 21:44:13-05:00, mayer at pogo.udel.edu 
  Bug #586 Check for <4 characters for the refid first

==== ntpq/ntpq-subs.c ====
2007-02-04 21:43:38-05:00, mayer at pogo.udel.edu +9 -10
  Bug #586 Check for <4 characters for the refid first

--- 1.25/ntpq/ntpq-subs.c	2006-10-23 00:37:58 -04:00
+++ 1.26/ntpq/ntpq-subs.c	2007-02-04 21:43:38 -05:00
@@ -1416,6 +1416,13 @@ doprintpeers(
 				havevar[HAVE_REFID] = 1;
 				if (*value == '\0') {
 					dstadr_refid = "0.0.0.0";
+				} else if ((int)strlen(value) <= 4) {
+					refid_string[0] = '.';
+					(void) strcpy(&refid_string[1], value);
+					i = strlen(refid_string);
+					refid_string[i] = '.';
+					refid_string[i+1] = '\0';
+					dstadr_refid = refid_string;
 				} else if (decodenetnum(value, &dstadr)) {
 					if (SOCKNUL(&dstadr))
 						dstadr_refid = "0.0.0.0";
@@ -1426,13 +1433,6 @@ doprintpeers(
 					else
 						dstadr_refid =
 						    stoa(&dstadr);
-				} else if ((int)strlen(value) <= 4) {
-					refid_string[0] = '.';
-					(void) strcpy(&refid_string[1], value);
-					i = strlen(refid_string);
-					refid_string[i] = '.';
-					refid_string[i+1] = '\0';
-					dstadr_refid = refid_string;
 				} else {
 					havevar[HAVE_REFID] = 0;
 				}
@@ -1469,9 +1469,8 @@ doprintpeers(
 				havevar[HAVE_OFFSET] = 1;
 			break;
 			case CP_JITTER:
-			if (pvl == peervarlist)
-				if (decodetime(value, &estjitter))
-					havevar[HAVE_JITTER] = 1;
+			if (decodetime(value, &estjitter))
+				havevar[HAVE_JITTER] = 1;
 			break;
 			case CP_DISPERSION:
 			if (decodetime(value, &estdisp))


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