summaryrefslogtreecommitdiff
path: root/cel
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-01-15 16:36:47 +0000
committerJoshua Colp <jcolp@digium.com>2014-01-15 16:36:47 +0000
commit07481baafdaf05eccd7d4dd30b7f79017056af5a (patch)
tree5080a583345954d7f86554e982dbfdd661eefc70 /cel
parent7cbb6eab15a29af562d1ef3f174f9af0b64b83b1 (diff)
cel_manager: Don't crash if configuration file is invalid.
The cel_manager module did not properly handle the case where the configuration file was invalid. The module will now output a warning message and disable itself if this occurs. Reported by: Bryan Walters ........ Merged revisions 405581 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 405582 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405583 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cel')
-rw-r--r--cel/cel_manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cel/cel_manager.c b/cel/cel_manager.c
index 2fc001fe1..610b6e4e0 100644
--- a/cel/cel_manager.c
+++ b/cel/cel_manager.c
@@ -153,7 +153,12 @@ static int load_config(int reload)
return 0;
}
- if (!cfg) {
+ if (cfg == CONFIG_STATUS_FILEINVALID) {
+ ast_log(LOG_WARNING, "Configuration file '%s' is invalid. CEL manager Module not activated.\n",
+ CONF_FILE);
+ enablecel = 0;
+ return -1;
+ } else if (!cfg) {
ast_log(LOG_WARNING, "Failed to load configuration file. CEL manager Module not activated.\n");
enablecel = 0;
return -1;