[asterisk-commits] russell: branch 1.6.0 r179463 - in /branches/1.6.0: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 2 17:02:53 CST 2009


Author: russell
Date: Mon Mar  2 17:02:49 2009
New Revision: 179463

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179463
Log:
Merged revisions 179462 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r179462 | russell | 2009-03-02 17:00:30 -0600 (Mon, 02 Mar 2009) | 16 lines

Merged revisions 179461 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179461 | russell | 2009-03-02 16:58:18 -0600 (Mon, 02 Mar 2009) | 8 lines

Ensure that only one thread is calling ast_settimeout() on a channel at a time.

For example, with an IAX2 channel, you can have both the channel thread and the
chan_iax2 processing threads calling this function, and doing so twice at the
same time is a bad thing.

(Found in a debugging session with dvossel and mmichelson)

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/channel.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/channel.c?view=diff&rev=179463&r1=179462&r2=179463
==============================================================================
--- branches/1.6.0/main/channel.c (original)
+++ branches/1.6.0/main/channel.c Mon Mar  2 17:02:49 2009
@@ -2233,6 +2233,7 @@
 {
 	int res = -1;
 #ifdef HAVE_DAHDI
+	ast_channel_lock(c);
 	if (c->timingfd > -1) {
 		if (!func) {
 			samples = 0;
@@ -2243,7 +2244,8 @@
 		c->timingfunc = func;
 		c->timingdata = data;
 	}
-#endif	
+	ast_channel_unlock(c);
+#endif
 	return res;
 }
 




More information about the asterisk-commits mailing list