Files
asterisk/main
Russell Bryant ae5c07f0f1 Change cleanup ordering in filestream destructor.
This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

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

Merged revisions 380210 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 01:57:26 +00:00
..
2012-12-03 20:43:03 +00:00
2012-06-15 16:20:16 +00:00
2012-03-24 02:42:42 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-07-06 15:31:52 +00:00
2012-12-03 18:43:48 +00:00
2013-01-03 18:48:00 +00:00
2012-06-15 16:20:16 +00:00
2012-03-22 19:51:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-12-11 00:34:46 +00:00
2012-03-22 19:51:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-12-11 02:12:26 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-04-28 01:33:49 +00:00
2012-06-15 16:20:16 +00:00
2012-12-11 20:03:23 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-09-25 23:09:40 +00:00
2012-06-15 16:20:16 +00:00
2012-03-22 19:51:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-12-11 20:45:02 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-07-30 23:26:51 +00:00
2012-12-11 21:12:26 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00