[asterisk-commits] jpeeler: trunk r114866 - /trunk/channels/iax2-provision.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 29 17:54:15 CDT 2008
Author: jpeeler
Date: Tue Apr 29 17:54:14 2008
New Revision: 114866
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114866
Log:
Fixes a problem where all the templates were marked as dead no matter what. The templates should only be marked as dead if a configuration file has been successfully loaded and has changes. Bug found while making API documentation for 1.6.0.
Modified:
trunk/channels/iax2-provision.c
Modified: trunk/channels/iax2-provision.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/iax2-provision.c?view=diff&rev=114866&r1=114865&r2=114866
==============================================================================
--- trunk/channels/iax2-provision.c (original)
+++ trunk/channels/iax2-provision.c Tue Apr 29 17:54:14 2008
@@ -491,14 +491,16 @@
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
if (!provinit)
iax_provision_init();
- /* Mark all as dead. No need for locking */
- cur = templates;
- while(cur) {
- cur->dead = 1;
- cur = cur->next;
- }
+
cfg = ast_config_load2("iaxprov.conf", "chan_iax2", config_flags);
if (cfg != NULL && cfg != CONFIG_STATUS_FILEUNCHANGED) {
+ /* Mark all as dead. No need for locking */
+ cur = templates;
+ while(cur) {
+ cur->dead = 1;
+ cur = cur->next;
+ }
+
/* Load as appropriate */
cat = ast_category_browse(cfg, NULL);
while(cat) {
More information about the asterisk-commits
mailing list