[Asterisk-cvs] asterisk channel.c,1.210,1.211

kpfleming at lists.digium.com kpfleming at lists.digium.com
Tue Jul 5 18:13:01 CDT 2005


Update of /usr/cvsroot/asterisk
In directory localhost.localdomain:/tmp/cvs-serv1767

Modified Files:
	channel.c 
Log Message:
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)


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -d -r1.210 -r1.211
--- channel.c	5 Jul 2005 19:52:48 -0000	1.210
+++ channel.c	5 Jul 2005 22:21:54 -0000	1.211
@@ -1885,8 +1885,6 @@
 			} 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 @@
 				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;
 		}




More information about the svn-commits mailing list