Mercurial > dovecot > core-2.2
diff src/config/main.c @ 9793:d7ccdbb58a03 HEAD
config: If master module requests configuration, reread it before replying.
If new configuration is invalid, send an ERROR reply back.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 14 Aug 2009 18:13:35 -0400 |
parents | 0c587f108916 |
children | e95135898a3c |
line wrap: on
line diff
--- a/src/config/main.c Fri Aug 14 17:36:27 2009 -0400 +++ b/src/config/main.c Fri Aug 14 18:13:35 2009 -0400 @@ -18,6 +18,7 @@ int main(int argc, char *argv[]) { + const char *path, *error; int c; master_service = master_service_init("config", 0, argc, argv); @@ -28,7 +29,10 @@ master_service_init_log(master_service, "config: ", 0); master_service_init_finish(master_service); - config_parse_file(master_service_get_config_path(master_service), TRUE); + + path = master_service_get_config_path(master_service); + if (config_parse_file(path, TRUE, &error) < 0) + i_fatal("%s", error); master_service_run(master_service, client_connected); config_connections_destroy_all();