[asterisk-commits] rmudgett: branch 11 r399442 - /branches/11/main/udptl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 18 18:36:16 CDT 2013
Author: rmudgett
Date: Wed Sep 18 18:36:12 2013
New Revision: 399442
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399442
Log:
UDPTL: Backport some fixes from v12 that should be in v11.
Backported the following as applied to udptl.c:
* -r398020 Fixup udpdl defaults if config file not present.
* -r398533 Fixup improper use of ao2_global_obj_replace().
Modified:
branches/11/main/udptl.c
Modified: branches/11/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/udptl.c?view=diff&rev=399442&r1=399441&r2=399442
==============================================================================
--- branches/11/main/udptl.c (original)
+++ branches/11/main/udptl.c Wed Sep 18 18:36:12 2013
@@ -1419,14 +1419,17 @@
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_unref(globals, udptl_cfg);
}
}
}
More information about the asterisk-commits
mailing list