diff options
author | Matt Jordan <mjordan@digium.com> | 2015-11-25 22:19:16 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-11-25 22:19:16 -0600 |
commit | 762dc9c89dd88cfb69067f76530574b5642d2045 (patch) | |
tree | 455cfad293c49d8b1b6b42b7bd3c2410f797990b | |
parent | 5d80a6e714fcf6dbd62a4720ea6853d8cb69a0b5 (diff) | |
parent | 45efbf8503a29d298a9cb6c5de4925037a642b35 (diff) |
Merge "fastagi: record file closed after sending result" into 13
-rw-r--r-- | res/res_agi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 921eeffce..ff3358062 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2630,8 +2630,8 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, const } f = ast_read(chan); if (!f) { - ast_agi_send(agi->fd, chan, "200 result=%d (hangup) endpos=%ld\n", -1, sample_offset); ast_closestream(fs); + ast_agi_send(agi->fd, chan, "200 result=%d (hangup) endpos=%ld\n", -1, sample_offset); if (sildet) ast_dsp_free(sildet); return RESULT_FAILURE; @@ -2645,8 +2645,8 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, const ast_stream_rewind(fs, 200); ast_truncstream(fs); sample_offset = ast_tellstream(fs); - ast_agi_send(agi->fd, chan, "200 result=%d (dtmf) endpos=%ld\n", f->subclass.integer, sample_offset); ast_closestream(fs); + ast_agi_send(agi->fd, chan, "200 result=%d (dtmf) endpos=%ld\n", f->subclass.integer, sample_offset); ast_frfree(f); if (sildet) ast_dsp_free(sildet); @@ -2690,8 +2690,8 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, const ast_truncstream(fs); sample_offset = ast_tellstream(fs); } - ast_agi_send(agi->fd, chan, "200 result=%d (timeout) endpos=%ld\n", res, sample_offset); ast_closestream(fs); + ast_agi_send(agi->fd, chan, "200 result=%d (timeout) endpos=%ld\n", res, sample_offset); } if (silence > 0) { |