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

Harlan Stenn stenn at whimsy.udel.edu
Tue Aug 5 09:02:54 UTC 2008


#### ChangeSet ####
2008-08-05 05:00:05-04:00, stenn at whimsy.udel.edu 
  [Bug 1047] enable/disable options processing fix

==== ChangeLog ====
2008-08-05 04:59:49-04:00, stenn at whimsy.udel.edu +1 -0
  [Bug 1047] enable/disable options processing fix

--- 1.197/ChangeLog	2008-07-23 22:26:36 -04:00
+++ 1.198/ChangeLog	2008-08-05 04:59:49 -04:00
@@ -1,3 +1,4 @@
+* [Bug 1047] enable/disable options processing fix.
 * header file cleanup.
 * [Bug 1037] buffer in subroutine was 1 byte short.
 * configure.ac: cleanup, add option for wintime, and lay the groundwork

==== ntpd/ntp_config.c ====
2008-08-05 04:59:50-04:00, stenn at whimsy.udel.edu +12 -15
  [Bug 1047] enable/disable options processing fix

--- 1.179/ntpd/ntp_config.c	2008-07-16 05:22:50 -04:00
+++ 1.180/ntpd/ntp_config.c	2008-08-05 04:59:50 -04:00
@@ -198,7 +198,7 @@ extern unsigned int qos;				/* QoS setti
 
 /* FUNCTION PROTOTYPES */
 
-static int get_flags_from_list(queue *flag_list);
+static void call_proto_config_from_list(queue *flag_list, int able_flag);
 static void init_auth_node(void);
 static void init_syntax_tree(void);
 double *create_dval(double val);
@@ -249,20 +249,23 @@ static void do_resolve_internal(void);
  * ----------------------------
  */
 
-static int
-get_flags_from_list(
-	queue *flag_list
+static void
+call_proto_config_from_list(
+	queue *flag_list,
+	int able
 	)
 {
-	int flags = 0;
+	int flag;
 	struct attr_val *curr_flag;
 
 	while (!empty(flag_list)) {
 		curr_flag = (struct attr_val *) dequeue(flag_list);
-		flags |= curr_flag->value.i;
+		flag = curr_flag->value.i;
+		if (flag)
+			proto_config(flag, able, 0., NULL);
 		free_node(curr_flag);
 	}
-	return flags;
+	return;
 }
 
 static void
@@ -1290,16 +1293,10 @@ config_tinker(void)
 static void
 config_system_opts(void)
 {
-	int enable_flags;
-	int disable_flags;
 
-	enable_flags = get_flags_from_list(my_config.enable_opts);
-	disable_flags = get_flags_from_list(my_config.disable_opts);
+	call_proto_config_from_list(my_config.enable_opts, 1);
+	call_proto_config_from_list(my_config.disable_opts, 0);
 
-	if (enable_flags)
-		proto_config(enable_flags, 1, 0., NULL);
-	if (disable_flags)
-		proto_config(disable_flags, 0, 0., NULL);
 }
 
 static void


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