[asterisk-dev] [Code Review] Fix spool handling to allow call files to be hardlinked into place
Paul Belanger
reviewboard at asterisk.org
Fri Aug 26 20:35:59 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1391/#review4150
-----------------------------------------------------------
/trunk/pbx/pbx_spool.c
<https://reviewboard.asterisk.org/r/1391/#comment8145>
braces {}
/trunk/pbx/pbx_spool.c
<https://reviewboard.asterisk.org/r/1391/#comment8144>
braces for if statements.
if (foo) {
blah;
}
- Paul
On Aug. 26, 2011, 5:49 p.m., dwmw2 wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1391/
> -----------------------------------------------------------
>
> (Updated Aug. 26, 2011, 5:49 p.m.)
>
>
> Review request for Asterisk Developers and Kevin Fleming.
>
>
> Summary
> -------
>
> This fixes the inotify code to handle call files being hardlinked into the spool directory.
>
> The smsq utility does this, instead of rename(), to ensure that it cannot accidentally overwrite an existing spool file. A rename() might do that, but link() will definitely not.
>
> The inotify code had broken this, because it would wait for an IN_CLOSE_WRITE event on the file... which was never forthcoming, since it was never opened. Now we look for IN_OPEN events following the IN_CREATE event, and only wait for an IN_CLOSE_WRITE if the file was actually opened.
>
>
> This addresses bug ASTERISK-18331.
> https://issues.asterisk.org/jira/browse/ASTERISK-18331
>
>
> Diffs
> -----
>
> /trunk/pbx/pbx_spool.c 333475
>
> Diff: https://reviewboard.asterisk.org/r/1391/diff
>
>
> Testing
> -------
>
> Creating call files with rename(), with link() and also with open(O_CREAT).
>
>
> Thanks,
>
> dwmw2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110827/6ccfb1bb/attachment.htm>
More information about the asterisk-dev
mailing list