[asterisk-commits] rmudgett: trunk r370589 - /trunk/apps/app_confbridge.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 30 15:27:42 CDT 2012
Author: rmudgett
Date: Mon Jul 30 15:27:39 2012
New Revision: 370589
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370589
Log:
DECLINE to load confbridge if the config fails to load.
Modified:
trunk/apps/app_confbridge.c
Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=370589&r1=370588&r2=370589
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Mon Jul 30 15:27:39 2012
@@ -2831,6 +2831,7 @@
static int load_module(void)
{
int res = 0;
+
if ((ast_custom_function_register(&confbridge_function))) {
return AST_MODULE_LOAD_FAILURE;
}
@@ -2865,10 +2866,15 @@
res |= ast_manager_register_xml("ConfbridgeStartRecord", EVENT_FLAG_CALL, action_confbridgestartrecord);
res |= ast_manager_register_xml("ConfbridgeStopRecord", EVENT_FLAG_CALL, action_confbridgestoprecord);
res |= ast_manager_register_xml("ConfbridgeSetSingleVideoSrc", EVENT_FLAG_CALL, action_confbridgesetsinglevideosrc);
-
- res |= conf_load_config(0);
-
- return res;
+ if (res) {
+ return AST_MODULE_LOAD_FAILURE;
+ }
+
+ if (conf_load_config(0)) {
+ ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
+ return AST_MODULE_LOAD_DECLINE;
+ }
+ return AST_MODULE_LOAD_SUCCESS;
}
static int reload(void)
More information about the asterisk-commits
mailing list