summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-10-24 03:09:48 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-10-24 03:09:48 +0000
commita8d3ee89c6ad714d27810ee68ca203259d0471fe (patch)
treeb89105a15b5725584a2bb122547faedb7a5f98fb /main/channel.c
parent283b1bdeb31255f864545ddce9ae986ee0754f56 (diff)
Merged revisions 46078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46078 | tilghman | 2006-10-23 22:01:00 -0500 (Mon, 23 Oct 2006) | 3 lines Pass through a frame if we don't know what it is, rather than trying to pass a NULL, which will segfault a channel driver (Bug 8149) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 9a53205ce..65572d3e8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2615,7 +2615,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
res = 0;
break;
default:
- res = chan->tech->write(chan, f);
+ /* At this point, fr is the incoming frame and f is NULL. Channels do
+ * not expect to get NULL as a frame pointer and will segfault. Hence,
+ * we output the original frame passed in. */
+ res = chan->tech->write(chan, fr);
break;
}