mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
DECLINE to load confbridge if the config fails to load.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2831,6 +2831,7 @@ static int unload_module(void)
|
|||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
if ((ast_custom_function_register(&confbridge_function))) {
|
if ((ast_custom_function_register(&confbridge_function))) {
|
||||||
return AST_MODULE_LOAD_FAILURE;
|
return AST_MODULE_LOAD_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -2865,10 +2866,15 @@ static int load_module(void)
|
|||||||
res |= ast_manager_register_xml("ConfbridgeStartRecord", EVENT_FLAG_CALL, action_confbridgestartrecord);
|
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("ConfbridgeStopRecord", EVENT_FLAG_CALL, action_confbridgestoprecord);
|
||||||
res |= ast_manager_register_xml("ConfbridgeSetSingleVideoSrc", EVENT_FLAG_CALL, action_confbridgesetsinglevideosrc);
|
res |= ast_manager_register_xml("ConfbridgeSetSingleVideoSrc", EVENT_FLAG_CALL, action_confbridgesetsinglevideosrc);
|
||||||
|
if (res) {
|
||||||
|
return AST_MODULE_LOAD_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
res |= conf_load_config(0);
|
if (conf_load_config(0)) {
|
||||||
|
ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
|
||||||
return res;
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
return AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reload(void)
|
static int reload(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user