mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
features_config: Don't require features.conf to be present for Asterisk to load
(closes issue ASTERISK-22426) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2806/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@398020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
main/udptl.c
13
main/udptl.c
@@ -1458,14 +1458,17 @@ static int removed_options_handler(const struct aco_option *opt, struct ast_vari
|
||||
|
||||
static void __ast_udptl_reload(int reload)
|
||||
{
|
||||
RAII_VAR(struct udptl_config *, udptl_cfg, udptl_snapshot_alloc(), ao2_cleanup);
|
||||
|
||||
if (aco_process_config(&cfg_info, reload) == ACO_PROCESS_ERROR) {
|
||||
if (!reload) {
|
||||
if (!aco_set_defaults(&general_option, "general", udptl_cfg->general)) {
|
||||
ast_log(LOG_WARNING, "Could not load udptl config; using defaults\n");
|
||||
ao2_global_obj_replace(globals, udptl_cfg);
|
||||
RAII_VAR(struct udptl_config *, udptl_cfg, udptl_snapshot_alloc(), ao2_cleanup);
|
||||
|
||||
if (aco_set_defaults(&general_option, "general", udptl_cfg->general)) {
|
||||
ast_log(LOG_ERROR, "Failed to load udptl.conf and failed to initialize defaults.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ast_log(LOG_NOTICE, "Could not load udptl config; using defaults\n");
|
||||
ao2_global_obj_replace(globals, udptl_cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user