mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Prevent crash from using app_page with no confbridge.conf file provided.
Also prevents other potential crashes when using aco API with uninitialized aco_info structs. (closes issue ASTERISK-20305) reported by Noah Engelberth Tested by Noah Engelberth Review: https://reviewboard.asterisk.org/r/2086 ........ Merged revisions 372135 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2832,6 +2832,10 @@ static int load_module(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
if (conf_load_config(0)) {
|
||||
ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
if ((ast_custom_function_register(&confbridge_function))) {
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
@@ -2870,10 +2874,6 @@ static int load_module(void)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user