aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 03:01:00 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 03:01:00 +0000
commit775dabe9892b5a0e8c3bf3d9b389e4a6b0fb5c0a (patch)
tree9f69fd3cad092229fe374dd2e1d4ff80f44f4b88 /main
parentbc8c087a8703293fce63841dddd99c5a3535556a (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@46078 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index fb0d7464c..4c6b630e4 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2611,7 +2611,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;
}