]> git.ipfire.org Git - thirdparty/asterisk.git/commit
StopMixMonitor race condition (not giving up file immediately)
authorDavid Vossel <dvossel@digium.com>
Wed, 17 Jun 2009 19:28:12 +0000 (19:28 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 17 Jun 2009 19:28:12 +0000 (19:28 +0000)
commit86c204f34c31b4aec2dde74331af346bd253bff2
tree5f2e156654e80f33cef607287d9ea5e7aa5c6a21
parentebe2c1829b1f7fb80cdfae140f69a1f97e9e34e7
StopMixMonitor race condition (not giving up file immediately)

StopMixMonitor only indicates to the MixMonitor thread to stop
writing to the file.  It does not guarantee that the recording's
file handle is available to the dialplan immediately after execution.
This results in a race condition.  To resolve this, the filestream
pointer is placed in a datastore on the channel. When StopMixMonitor
is called, the datastore is retrieved from the channel and the
filestream is closed immediately before returning to the dialplan.
Documentation indicating the use of StopMixMonitor to free files
has been updated as well.

(closes issue #15259)
Reported by: travisghansen
Tested by: dvossel

Review: https://reviewboard.asterisk.org/r/283/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@201423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_mixmonitor.c