[asterisk-commits] file: trunk r405584 - in /trunk: ./ cel/cel_manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 15 10:36:50 CST 2014


Author: file
Date: Wed Jan 15 10:36:47 2014
New Revision: 405584

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=405584
Log:
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

Modified:
    trunk/   (props changed)
    trunk/cel/cel_manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/cel/cel_manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/cel/cel_manager.c?view=diff&rev=405584&r1=405583&r2=405584
==============================================================================
--- trunk/cel/cel_manager.c (original)
+++ trunk/cel/cel_manager.c Wed Jan 15 10:36:47 2014
@@ -153,7 +153,12 @@
 		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;




More information about the asterisk-commits mailing list