diff --git a/bin/delv/delv.c b/bin/delv/delv.c index 8754d1b328..9ddb0c4eca 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -743,8 +743,8 @@ setup_dnsseckeys(dns_client_t *client) { isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1); isc_buffer_add(&b, sizeof(anchortext) - 1); - result = cfg_parse_buffer(parser, &b, &cfg_type_bindkeys, - &bindkeys); + result = cfg_parse_buffer(parser, &b, NULL, 0, + &cfg_type_bindkeys, 0, &bindkeys); if (result != ISC_R_SUCCESS) fatal("Unable to parse built-in keys"); } diff --git a/bin/named/config.c b/bin/named/config.c index 6b81e35d2d..7ca4ba5409 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -323,9 +323,9 @@ named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) { isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1); isc_buffer_add(&b, sizeof(defaultconf) - 1); - return (cfg_parse_buffer4(parser, &b, __FILE__, 0, - &cfg_type_namedconf, - CFG_PCTX_NODEPRECATED, conf)); + return (cfg_parse_buffer(parser, &b, __FILE__, 0, + &cfg_type_namedconf, + CFG_PCTX_NODEPRECATED, conf)); } isc_result_t diff --git a/bin/named/server.c b/bin/named/server.c index 9cac32f8e0..ce048544d3 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -2575,8 +2575,8 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) { result = dns_catz_generate_zonecfg(ev->origin, ev->entry, &confbuf); if (result == ISC_R_SUCCESS) { cfg_parser_reset(cfg->add_parser); - result = cfg_parse_buffer3(cfg->add_parser, confbuf, "catz", 0, - &cfg_type_addzoneconf, &zoneconf); + result = cfg_parse_buffer(cfg->add_parser, confbuf, "catz", 0, + &cfg_type_addzoneconf, 0, &zoneconf); isc_buffer_free(&confbuf); } /* @@ -7642,8 +7642,8 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, CHECK(putstr(text, ";\n")); cfg_parser_reset(named_g_addparser); - result = cfg_parse_buffer3(named_g_addparser, *text, zone_name, 0, - &cfg_type_addzoneconf, &zoneconf); + result = cfg_parse_buffer(named_g_addparser, *text, zone_name, 0, + &cfg_type_addzoneconf, 0, &zoneconf); if (result != ISC_R_SUCCESS) { isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, @@ -12727,8 +12727,8 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp, isc_buffer_forward(&argbuf, 3); cfg_parser_reset(named_g_addparser); - CHECK(cfg_parse_buffer3(named_g_addparser, &argbuf, bn, 0, - &cfg_type_addzoneconf, &zoneconf)); + CHECK(cfg_parse_buffer(named_g_addparser, &argbuf, bn, 0, + &cfg_type_addzoneconf, 0, &zoneconf)); CHECK(cfg_map_get(zoneconf, "zone", &zlist)); if (!cfg_obj_islist(zlist)) CHECK(ISC_R_FAILURE); diff --git a/bin/plugins/filter-aaaa.c b/bin/plugins/filter-aaaa.c index b7c80e54d1..025ebeae0e 100644 --- a/bin/plugins/filter-aaaa.c +++ b/bin/plugins/filter-aaaa.c @@ -307,8 +307,8 @@ parse_parameters(filter_instance_t *inst, const char *parameters, isc_buffer_constinit(&b, parameters, strlen(parameters)); isc_buffer_add(&b, strlen(parameters)); - CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line, - &cfg_type_parameters, 0, ¶m_obj)); + CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line, + &cfg_type_parameters, 0, ¶m_obj)); CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx)); @@ -420,8 +420,8 @@ plugin_check(const char *parameters, isc_buffer_constinit(&b, parameters, strlen(parameters)); isc_buffer_add(&b, strlen(parameters)); - CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line, - &cfg_type_parameters, 0, ¶m_obj)); + CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line, + &cfg_type_parameters, 0, ¶m_obj)); CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx)); diff --git a/lib/isccfg/include/isccfg/cfg.h b/lib/isccfg/include/isccfg/cfg.h index 03d340bd81..56dffb167f 100644 --- a/lib/isccfg/include/isccfg/cfg.h +++ b/lib/isccfg/include/isccfg/cfg.h @@ -115,17 +115,6 @@ cfg_parse_file(cfg_parser_t *pctx, const char *file, isc_result_t cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer, - const cfg_type_t *type, cfg_obj_t **ret); -isc_result_t -cfg_parse_buffer2(cfg_parser_t *pctx, isc_buffer_t *buffer, - const char *file, const cfg_type_t *type, - cfg_obj_t **ret); -isc_result_t -cfg_parse_buffer3(cfg_parser_t *pctx, isc_buffer_t *buffer, - const char *file, unsigned int line, - const cfg_type_t *type, cfg_obj_t **ret); -isc_result_t -cfg_parse_buffer4(cfg_parser_t *pctx, isc_buffer_t *buffer, const char *file, unsigned int line, const cfg_type_t *type, unsigned int flags, cfg_obj_t **ret); diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index c78a7eefe0..906defc929 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -622,32 +622,9 @@ cfg_parse_file(cfg_parser_t *pctx, const char *filename, isc_result_t cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer, - const cfg_type_t *type, cfg_obj_t **ret) -{ - return (cfg_parse_buffer4(pctx, buffer, NULL, 0, type, 0, ret)); -} - -isc_result_t -cfg_parse_buffer2(cfg_parser_t *pctx, isc_buffer_t *buffer, - const char *file, const cfg_type_t *type, - cfg_obj_t **ret) -{ - return (cfg_parse_buffer4(pctx, buffer, file, 0, type, 0, ret)); -} - -isc_result_t -cfg_parse_buffer3(cfg_parser_t *pctx, isc_buffer_t *buffer, - const char *file, unsigned int line, - const cfg_type_t *type, cfg_obj_t **ret) -{ - return (cfg_parse_buffer4(pctx, buffer, file, line, type, 0, ret)); -} - -isc_result_t -cfg_parse_buffer4(cfg_parser_t *pctx, isc_buffer_t *buffer, - const char *file, unsigned int line, - const cfg_type_t *type, unsigned int flags, - cfg_obj_t **ret) + const char *file, unsigned int line, + const cfg_type_t *type, unsigned int flags, + cfg_obj_t **ret) { isc_result_t result; diff --git a/lib/isccfg/tests/parser_test.c b/lib/isccfg/tests/parser_test.c index 9cadf19a46..51c2a36664 100644 --- a/lib/isccfg/tests/parser_test.c +++ b/lib/isccfg/tests/parser_test.c @@ -118,8 +118,8 @@ parse_buffer_test(void **state) { result = cfg_parser_create(mctx, lctx, &p1); assert_int_equal(result, ISC_R_SUCCESS); - result = cfg_parse_buffer3(p1, &buf1, "text1", 0, - &cfg_type_namedconf, &c1); + result = cfg_parse_buffer(p1, &buf1, "text1", 0, + &cfg_type_namedconf, 0, &c1); assert_int_equal(result, ISC_R_SUCCESS); assert_int_equal(p1->line, 5); @@ -130,8 +130,8 @@ parse_buffer_test(void **state) { result = cfg_parser_create(mctx, lctx, &p2); assert_int_equal(result, ISC_R_SUCCESS); - result = cfg_parse_buffer3(p2, &buf2, "text2", 100, - &cfg_type_namedconf, &c2); + result = cfg_parse_buffer(p2, &buf2, "text2", 100, + &cfg_type_namedconf, 0, &c2); assert_int_equal(result, ISC_R_SUCCESS); assert_int_equal(p2->line, 104); diff --git a/lib/isccfg/win32/libisccfg.def b/lib/isccfg/win32/libisccfg.def index 45b039b531..9d1af2cedf 100644 --- a/lib/isccfg/win32/libisccfg.def +++ b/lib/isccfg/win32/libisccfg.def @@ -67,9 +67,6 @@ cfg_parse_astring cfg_parse_boolean cfg_parse_bracketed_list cfg_parse_buffer -cfg_parse_buffer2 -cfg_parse_buffer3 -cfg_parse_buffer4 cfg_parse_dscp cfg_parse_enum cfg_parse_enum_or_other