[asterisk-dev] [Code Review] Fix spool handling to allow call files to be hardlinked into place

Tilghman Lesher reviewboard at asterisk.org
Fri Aug 26 18:26:31 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1391/#review4149
-----------------------------------------------------------

Ship it!


Looks good.

- Tilghman


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/20110826/39989a6f/attachment-0001.htm>


More information about the asterisk-dev mailing list