From 2929ed9be0e5e80692bdd6d61c6321f82665b760 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 13 Mar 2015 11:57:34 +0900 Subject: [PATCH] Make parameters 'conninfo' and 'node_name' mandatory There's no reason why they need to be absent; if absent they're likely to cause confusion. --- config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config.c b/config.c index 02ed1831..088bf35b 100644 --- a/config.c +++ b/config.c @@ -254,6 +254,18 @@ parse_config(const char *config_file, t_configuration_options *options) exit(ERR_BAD_CONFIG); } + if (*options->node_name == '\0') + { + log_err(_("Parameter 'node_name' was not found. Check the configuration file.\n")); + exit(ERR_BAD_CONFIG); + } + + if (*options->conninfo == '\0') + { + log_err(_("Parameter 'conninfo' was not found. Check the configuration file.\n")); + exit(ERR_BAD_CONFIG); + } + /* The following checks are for value parameter values */ if (options->master_response_timeout <= 0) {