[asterisk-commits] file: branch 1.8 r405581 - /branches/1.8/cel/cel_manager.c

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


Author: file
Date: Wed Jan 15 10:34:45 2014
New Revision: 405581

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

Modified:
    branches/1.8/cel/cel_manager.c

Modified: branches/1.8/cel/cel_manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/cel/cel_manager.c?view=diff&rev=405581&r1=405580&r2=405581
==============================================================================
--- branches/1.8/cel/cel_manager.c (original)
+++ branches/1.8/cel/cel_manager.c Wed Jan 15 10:34:45 2014
@@ -128,7 +128,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