From 5b123e4666d053231bffa735b7940e28e59d9395 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 22 Nov 2008 18:39:00 +0100 Subject: [PATCH] processes plugin: Do not silently ignore configuration errors. --- src/processes.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/processes.c b/src/processes.c index f229804d..3b219906 100644 --- a/src/processes.c +++ b/src/processes.c @@ -459,12 +459,18 @@ static int ps_config (const char *key, const char *value) int fields_num; new_val = strdup (value); - if (new_val == NULL) + if (new_val == NULL) { + ERROR ("processes plugin: strdup failed when processing " + "`ProcessMatch %s'.", value); return (1); + } + fields_num = strsplit (new_val, fields, STATIC_ARRAY_SIZE (fields)); if (fields_num != 2) { + ERROR ("processes plugin: `ProcessMatch' needs exactly " + "two string arguments."); sfree (new_val); return (1); } @@ -473,6 +479,8 @@ static int ps_config (const char *key, const char *value) } else { + ERROR ("processes plugin: The `%s' configuration option is not " + "understood and will be ignored.", key); return (-1); } -- 2.11.0