[asterisk-commits] mmichelson: branch 1.6.0 r117368 - in /branches/1.6.0: ./ main/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 20 21:21:38 CDT 2008


Author: mmichelson
Date: Tue May 20 21:21:38 2008
New Revision: 117368

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117368
Log:
Merged revisions 117367 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r117367 | mmichelson | 2008-05-20 21:20:31 -0500 (Tue, 20 May 2008) | 19 lines

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


........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/config.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/config.c?view=diff&rev=117368&r1=117367&r2=117368
==============================================================================
--- branches/1.6.0/main/config.c (original)
+++ branches/1.6.0/main/config.c Tue May 20 21:21:38 2008
@@ -864,7 +864,7 @@
 	/* 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) {




More information about the asterisk-commits mailing list