[asterisk-commits] tilghman: branch 1.6.2 r221204 - in /branches/1.6.2: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 30 11:58:01 CDT 2009
Author: tilghman
Date: Wed Sep 30 11:57:56 2009
New Revision: 221204
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221204
Log:
Merged revisions 221201 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r221201 | tilghman | 2009-09-30 11:56:42 -0500 (Wed, 30 Sep 2009) | 14 lines
Merged revisions 221200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r221200 | tilghman | 2009-09-30 11:55:21 -0500 (Wed, 30 Sep 2009) | 7 lines
Avoid a potential NULL dereference.
(closes issue #15865)
Reported by: kobaz
Patches:
20090915__issue15865.diff.txt uploaded by tilghman (license 14)
Tested by: kobaz
........
................
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/main/channel.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=221204&r1=221203&r2=221204
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Wed Sep 30 11:57:56 2009
@@ -2507,9 +2507,9 @@
static void ast_read_generator_actions(struct ast_channel *chan, struct ast_frame *f)
{
- if (chan->generatordata && !ast_internal_timing_enabled(chan)) {
+ if (chan->generator && chan->generator->generate && chan->generatordata && !ast_internal_timing_enabled(chan)) {
void *tmp = chan->generatordata;
- int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples) = NULL;
+ int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples) = chan->generator->generate;
int res;
int samples;
@@ -2528,9 +2528,6 @@
samples = f->samples;
}
- if (chan->generator->generate) {
- generate = chan->generator->generate;
- }
/* This unlock is here based on two assumptions that hold true at this point in the
* code. 1) this function is only called from within __ast_read() and 2) all generators
* call ast_write() in their generate callback.
More information about the asterisk-commits
mailing list