[asterisk-commits] russell: trunk r107100 - in /trunk: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 10 11:59:14 CDT 2008


Author: russell
Date: Mon Mar 10 11:59:13 2008
New Revision: 107100

URL: http://svn.digium.com/view/asterisk?view=rev&rev=107100
Log:
Merged revisions 107099 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107099 | russell | 2008-03-10 11:58:57 -0500 (Mon, 10 Mar 2008) | 3 lines

Fix a race condition where the generator can go away
(closes issue #12175, reported by edantie, patched by me)

........

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/view/asterisk/trunk/main/channel.c?view=diff&rev=107100&r1=107099&r2=107100
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Mar 10 11:59:13 2008
@@ -1711,8 +1711,12 @@
 	ast_channel_lock(chan);
 	tmp = chan->generatordata;
 	chan->generatordata = NULL;
-	generate = chan->generator->generate;
+	if (chan->generator)
+		generate = chan->generator->generate;
 	ast_channel_unlock(chan);
+
+	if (!tmp || !generate)
+		return 0;
 
 	res = generate(chan, tmp, 0, 160);
 




More information about the asterisk-commits mailing list