[asterisk-commits] russell: trunk r179462 - in /trunk: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 2 17:00:33 CST 2009
Author: russell
Date: Mon Mar 2 17:00:30 2009
New Revision: 179462
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179462
Log:
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:
trunk/ (props changed)
trunk/main/channel.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=179462&r1=179461&r2=179462
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Mar 2 17:00:30 2009
@@ -2243,7 +2243,10 @@
int res;
unsigned int real_rate = rate, max_rate;
+ ast_channel_lock(c);
+
if (c->timingfd == -1) {
+ ast_channel_unlock(c);
return -1;
}
@@ -2262,6 +2265,8 @@
c->timingfunc = func;
c->timingdata = data;
+
+ ast_channel_unlock(c);
return res;
}
More information about the asterisk-commits
mailing list