From: Joshua Colp Date: Wed, 15 Jan 2014 16:35:30 +0000 (+0000) Subject: cel_manager: Don't crash if configuration file is invalid. X-Git-Tag: 11.9.0-rc1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d1ce59cf222e2a61c1eb314f6cffcf8bd591b2d;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405582 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cel/cel_manager.c b/cel/cel_manager.c index e1d0dc148c..ba28971efb 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;