aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-21 02:20:31 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-21 02:20:31 +0000
commit1c9b0da173019eab50b5573378402f99fd19f9dc (patch)
treec540b0d9216288860c221fac6d6ddcf03d4b9593 /main/config.c
parent6a90ea060cadb00ac7cba8123d400aa2f4a1a18c (diff)
Be sure that we cache included files for each source file which loads
a configuration file. As it was, only the first did so. This led to a problem if the included file was changed (but not the configuration file which includes it) and the second source file attempted to reload the configuration. It would not see that the included file had changed. In this particular example, res_phoneprov and chan_sip both loaded sip.conf, which included a file call sip.peers.conf. Since res_phoneprov was the first to load sip.conf, only it cached the fact that sip.conf included sip.peers.conf. If sip.peers.conf were changed and sip.conf were not and a sip reload were issued (meaning that chan_sip attempts to reload sip.conf only if it and its included files have changed) the changes made to sip.peers.conf would not be seen and therefore no action would be taken. (closes issue #12693) Reported by: marsosa git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117367 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/config.c b/main/config.c
index 2d707183c..4b035a4a5 100644
--- a/main/config.c
+++ b/main/config.c
@@ -864,7 +864,7 @@ static void config_cache_attribute(const char *configfile, enum config_cache_att
/* Find our cached entry for this configuration file */
AST_LIST_LOCK(&cfmtime_head);
AST_LIST_TRAVERSE(&cfmtime_head, cfmtime, list) {
- if (!strcmp(cfmtime->filename, configfile))
+ if (!strcmp(cfmtime->filename, configfile) && !strcmp(cfmtime->who_asked, who_asked))
break;
}
if (!cfmtime) {