diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 06:01:49 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 06:01:49 +0000 |
commit | 8a4c69c6245d7c0491f98b379ebb8416bdbd52c8 (patch) | |
tree | 974bd1a4bea0005c6cb5d9895db605657ce12f57 /main | |
parent | caa45439cc2843dad7268520426fb8955a4636a4 (diff) |
Merged revisions 50727 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r50727 | file | 2007-01-13 01:00:24 -0500 (Sat, 13 Jan 2007) | 2 lines
Only write a frame out to the channel if one exists. There are cases where one may not and would therefore cause the channel driver to segfault. (issue #8434 reported by slimey)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50728 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c index dcdecdfdc..95639ebde 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2656,8 +2656,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) /* and now put it through the regular translator */ f = (chan->writetrans) ? ast_translate(chan->writetrans, f, 0) : f; } - - res = chan->tech->write(chan, f); + if (f) + res = chan->tech->write(chan, f); + else + res = 0; break; case AST_FRAME_NULL: case AST_FRAME_IAX: |