diff options
author | Jeff Peeler <jpeeler@digium.com> | 2008-04-29 22:54:14 +0000 |
---|---|---|
committer | Jeff Peeler <jpeeler@digium.com> | 2008-04-29 22:54:14 +0000 |
commit | 0d4ce02e5bb99c4e9a276b38d12c9e1164e0c0bf (patch) | |
tree | 3bc5911fb694ef2fe166bc9d73c9d3f5a37cf620 /channels/iax2-provision.c | |
parent | 1bff41eb440c1dcb43dde42599adecf581013f43 (diff) |
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/iax2-provision.c')
-rw-r--r-- | channels/iax2-provision.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c index fa5cdb093..4a5281c05 100644 --- a/channels/iax2-provision.c +++ b/channels/iax2-provision.c @@ -491,14 +491,16 @@ int iax_provision_reload(int reload) 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) { |