Merged revisions 342277 via svnmerge from
authorKinsey Moore <kmoore@digium.com>
Tue, 25 Oct 2011 16:08:52 +0000 (16:08 +0000)
committerKinsey Moore <kmoore@digium.com>
Tue, 25 Oct 2011 16:08:52 +0000 (16:08 +0000)
commitc34674511d6e471b0e820df7fac9e380eccabd54
treef4e2c55d7c7f97ad96fea1346cf18a03285ac68a
parent700f0a275225bce2c5b41ebf4cf03c060927123f
Merged revisions 342277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r342277 | kmoore | 2011-10-25 11:08:04 -0500 (Tue, 25 Oct 2011) | 25 lines

  Merged revisions 342276 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r342276 | kmoore | 2011-10-25 11:06:57 -0500 (Tue, 25 Oct 2011) | 18 lines

    Fix spool handling to allow call files to be hardlinked into place

    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.

    Patch-by: dwmw2
    (closes issue ASTERISK-18331)
    Review: https://reviewboard.asterisk.org/r/1391/
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
pbx/pbx_spool.c