From 00deff9069d0646932a22ae2a4dad30c50d80ade Mon Sep 17 00:00:00 2001 From: Gregory Duchatelet Date: Mon, 6 Jul 2015 11:20:31 +0200 Subject: [PATCH] [Fix] if 'node' config parameter is set as a string, nothing complain and all nodes are set to id '0'. --- config.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.c b/config.c index 908650cd..feb97e88 100644 --- a/config.c +++ b/config.c @@ -266,6 +266,12 @@ parse_config(const char *config_file, t_configuration_options *options) exit(ERR_BAD_CONFIG); } + if (options->node == 0) + { + log_err(_("'node' must be an integer > 0\n")); + exit(ERR_BAD_CONFIG); + } + if (*options->node_name == '\0') { log_err(_("required parameter 'node_name' was not found\n"));