[asterisk-dev] [Code Review] 3235: config: Add file size and nanosecond resolution fields to the cached modified config file information.
rmudgett
reviewboard at asterisk.org
Tue Feb 18 11:01:14 CST 2014
> On Feb. 18, 2014, 2:27 a.m., wdoekes wrote:
> > /branches/1.8/main/config.c, line 1095
> > <https://reviewboard.asterisk.org/r/3235/diff/1/?file=54048#file54048line1095>
> >
> > IMHO, the constants (digits) look nicer on the RHS of the comparison.
I prefer seeing comparisons as if the values were on a number line. It gives you a better visualization of the ranges being checked.
<-0-1-2-3-4-5->
if (1 < x)
if (x < 3)
if (x < 2 || 4 < x) x is outside the range
if (2 <= x && x <= 5) x is inside the range
- rmudgett
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3235/#review10897
-----------------------------------------------------------
On Feb. 18, 2014, 10:55 a.m., rmudgett wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3235/
> -----------------------------------------------------------
>
> (Updated Feb. 18, 2014, 10:55 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: AST-1303
> https://issues.asterisk.org/jira/browse/AST-1303
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Repeatedly modifying config files and reloading too fast sometimes fails to reload the configuration because the cached modification timestamp has one second resolution.
>
> * Added file size and nanosecond resolution fields to the cached config file modification timestamp information. Now if the file size changes or the file system supports nanosecond resolution the modified file has a better chance of being detected for reload.
>
> * Added a missing unlock in an off-nominal code path.
>
>
> Diffs
> -----
>
> /branches/1.8/main/config.c 408290
>
> Diff: https://reviewboard.asterisk.org/r/3235/diff/
>
>
> Testing
> -------
>
> Added a debug statement to the cfmstat_cmp() and checked that the saved stat() information changed when expected.
> Did several reloads of app_queue which indicates if it is not reloading queuerules.conf if the file did not change.
>
>
> Thanks,
>
> rmudgett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140218/a2c8c2cb/attachment-0001.html>
More information about the asterisk-dev
mailing list