[svn-commits] russell: branch 1.6.1 r179464 - in /branches/1.6.1: ./ main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 2 17:04:21 CST 2009


Author: russell
Date: Mon Mar  2 17:04:18 2009
New Revision: 179464

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179464
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.1/   (props changed)
    branches/1.6.1/main/channel.c

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

Modified: branches/1.6.1/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=179464&r1=179463&r2=179464
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Mon Mar  2 17:04:18 2009
@@ -2218,7 +2218,10 @@
 	int res;
 	unsigned int real_rate = rate, max_rate;
 
+	ast_channel_lock(c);
+
 	if (c->timingfd == -1) {
+		ast_channel_unlock(c);
 		return -1;
 	}
 
@@ -2237,6 +2240,8 @@
 
 	c->timingfunc = func;
 	c->timingdata = data;
+
+	ast_channel_unlock(c);
 
 	return res;
 }




More information about the svn-commits mailing list