From: Timo Sirainen Date: Tue, 10 Feb 2009 00:39:04 +0000 (-0500) Subject: Removed some unnecessary code. X-Git-Tag: 2.0.alpha1~1037^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fde0587c798de67978a7b25f15b37cb1f42067d;p=thirdparty%2Fdovecot%2Fcore.git Removed some unnecessary code. --HG-- branch : HEAD --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 6fd0ab298c..a11b2cd567 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -23,58 +23,6 @@ struct input_stack { unsigned int linenum; }; -void config_parsers_fix_parents(pool_t pool) -{ -#if 0 - struct config_setting_parser_list *l; - const struct setting_define *d; - ARRAY_DEFINE(parents, ARRAY_TYPE(dynamic_settings_parsers)); - ARRAY_TYPE(dynamic_settings_parsers) *parsers; - struct dynamic_settings_parsers *parser; - unsigned int i, count; - - /* FIXME: currently we assume everyone are under a single parent */ - t_push(); - t_array_init(&parents, 4); - for (l = config_setting_parsers; l->module_name != NULL; l++) { - if (l->root->parent == NULL) - continue; - - for (d = l->root->parent->defines; d->key != NULL; d++) { - if (d->list_info == l->root) - break; - } - - if (d->key == NULL) { - parsers = array_get_modifiable(&parents, &count); - for (i = 0; i < count; i++) { - parser = array_idx_modifiable(&parsers[i], 0); - if (parser->info->parent == l->root->parent) - break; - } - if (i == count) { - parsers = array_append_space(&parents); - t_array_init(parsers, 16); - } - - parser = array_append_space(parsers); - parser->name = l->module_name; - parser->info = l->root; - } - } - - parsers = array_get_modifiable(&parents, &count); - for (i = 0; i < count; i++) { - (void)array_append_space(&parsers[i]); /* NULL-terminate */ - parser = array_idx_modifiable(&parsers[i], 0); - - settings_parser_info_update(pool, parser->info->parent, parser); - } - - t_pop(); -#endif -} - static const char * config_parse_line(pool_t pool, const char *key, const char *line, const struct setting_parser_info **info_r) diff --git a/src/config/config-parser.h b/src/config/config-parser.h index fe807c12ab..cf42d95799 100644 --- a/src/config/config-parser.h +++ b/src/config/config-parser.h @@ -1,8 +1,6 @@ #ifndef __CONFIG_PARSER_H #define __CONFIG_PARSER_H -void config_parsers_fix_parents(pool_t pool); - void config_parse_file(string_t *dest, const char *path, const char *service); #endif diff --git a/src/config/main.c b/src/config/main.c index 5f3fde0388..32e863b76f 100644 --- a/src/config/main.c +++ b/src/config/main.c @@ -21,9 +21,6 @@ static void main_init(const char *service) if (getenv("LOG_TO_MASTER") != NULL) i_set_failure_internal(); - parsers_pool = pool_alloconly_create("parent parsers", 2048); - config_parsers_fix_parents(parsers_pool); - config_string = str_new(default_pool, 10240); config_parse_file(config_string, config_path, service); str_append_c(config_string, '\n');