]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1736] tos int, bool options broken in 4.2.7p66.
authorDave Hart <hart@ntp.org>
Sat, 4 Dec 2010 08:15:35 +0000 (08:15 +0000)
committerDave Hart <hart@ntp.org>
Sat, 4 Dec 2010 08:15:35 +0000 (08:15 +0000)
bk: 4cf9f8a7P-fwanUdIyXBVXtEERxoVA

ChangeLog
clockstuff/Makefile.am
ntpd/ntp_config.c
ntpd/ntp_parser.c
ntpd/ntp_parser.y

index fa1fb8e0c598657308b5ce93efa86a668339892e..f61bcae78c97a19739dc689dc0296d156928bbd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
-* [Bug 1735] 'clocktime()' aborts ntpd on bogus input
+* [Bug 1735] clocktime() aborts ntpd on bogus input.
+* [Bug 1736] tos int, bool options broken in 4.2.7p66.
 (4.2.7p87) 2010/12/01 Released by Harlan Stenn <stenn@ntp.org>
 * from 4.2.6p3-RC12: Clean up m4 quoting in configure.ac, *.m4 files,
   resolving intermittent AC_LANG_PROGRAM possibly undefined errors.
index 6b244beb76ae7f4d9e1f1b49371eab86e8ce8a41..b97a3641ed2c81e3185ea2d14a34eb40ff031089 100644 (file)
@@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS =
 noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
 EXTRA_PROGRAMS = propdelay chutest clktest
 
-BUILT_SOURCES =        $(srcdir)/clktest-opts.c $(srcdir)/clktest-opts.h
+BUILT_SOURCES =        clktest-opts.c clktest-opts.h
+EXTRA_DIST = clktest-opts.def
 
 clktest_SOURCES = clktest.c clktest-opts.c
 
index 9e3dd9da920937e809d65246af713133db37527d..daa2268109a80cf9ee69dbf240ae5237e3c7cd65 100644 (file)
@@ -675,16 +675,11 @@ dump_config_tree(
 #ifdef DEBUG
                        default:
                                fprintf(df, "\n# dump error:\n"
-                                       "# unknown tos attr type %d\n"
-                                       "tos", atrv->type);
+                                       "# unknown tos attr type %d %s\n"
+                                       "tos", atrv->type, 
+                                       token_name(atrv->type));
                                break;
 #endif
-                       case T_Integer:
-                               fprintf(df, " %s %d", 
-                                       keyword(atrv->attr),
-                                       atrv->value.i);
-                               break;
-
                        case T_Double:
                                fprintf(df, " %s %s", 
                                        keyword(atrv->attr),
index bbccf6a41551e31393cebf0e43a4b029b6a03d3d..882b83b47fc59551fc8b439da122dc3fc802a5ed 100644 (file)
@@ -2479,7 +2479,7 @@ yyreduce:
 
 /* Line 1464 of yacc.c  */
 #line 593 "ntp_parser.y"
-    { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+    { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
     break;
 
   case 81:
@@ -2493,7 +2493,7 @@ yyreduce:
 
 /* Line 1464 of yacc.c  */
 #line 597 "ntp_parser.y"
-    { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+    { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
     break;
 
   case 93:
index 4338f6be119265cbd2e413fabddf1305e345e352..9cd2800d1a9f3cffe893d84c73f007718ba92bd2 100644 (file)
@@ -590,11 +590,11 @@ tos_option_list
 
 tos_option
        :       tos_option_int_keyword T_Integer
-                       { $$ = create_attr_ival($1, $2); }
+                       { $$ = create_attr_dval($1, (double)$2); }
        |       tos_option_dbl_keyword number
                        { $$ = create_attr_dval($1, $2); }
        |       T_Cohort boolean
-                       { $$ = create_attr_ival($1, $2); }
+                       { $$ = create_attr_dval($1, (double)$2); }
        ;
 
 tos_option_int_keyword