diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-05 22:21:54 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-05 22:21:54 +0000 |
commit | dbe003a6c1dd3fb4961b9d019d2655605b34d4ae (patch) | |
tree | 668c1e724d6e6b458bdc1a45abbd044fa00e060d | |
parent | 97236cfc3232271c35e2abcf6884267e7495210f (diff) |
don't write frames out to channel until after sending them to spies and/or monitor, since the channel driver might modify the frame data in the buffer (bug #4623)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6035 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1885,8 +1885,6 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) } else f = fr; if (f) { - res = chan->tech->write(chan, f); - if (f->frametype == AST_FRAME_VOICE && chan->spiers) { struct ast_channel_spy *spying; for (spying = chan->spiers; spying; spying=spying->next) { @@ -1917,6 +1915,8 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) if (ast_writestream(chan->monitor->write_stream, f) < 0) ast_log(LOG_WARNING, "Failed to write data to channel monitor write stream\n"); } + + res = chan->tech->write(chan, f); } else res = 0; } |