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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2012-09-04 15:26:07 +00:00
parent 57881c8dd9
commit 2dba1e5c58
2 changed files with 31 additions and 4 deletions

View File

@@ -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;
}