diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-20 16:46:02 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-20 16:46:02 +0000 |
commit | 9abee46004e30fc1a4e200bae65d5dca0a72e77d (patch) | |
tree | b8179571ed7b19986811c975e56601c864a3a5e7 /main/features.c | |
parent | bebb7d1790a07ceca943d617aefe3f45647c9749 (diff) |
Merged revisions 320057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r320057 | rmudgett | 2011-05-20 11:43:02 -0500 (Fri, 20 May 2011) | 19 lines
Crash while transferring a call during DTMF feature timeout.
When a call is being attended transferred during the time between
AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END, the transferred channel
becomes a zombie (so tech data is not available), making ast_dtmf_stream()
segfault when it tries to send the DTMF digit (at least with SIP
channels).
Patch based on feature-end-zombie.patch uploaded by Irontec (license 1256)
* Check for zombies when ast_channel_bridge() returns.
* Guarantee that the fo parameter value is initialized in
ast_channel_bridge() before any returns.
(closes issue #19116)
Reported by: Irontec
Tested by: rmudgett
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@320058 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/main/features.c b/main/features.c index 17dd2b7f7..2fb34384b 100644 --- a/main/features.c +++ b/main/features.c @@ -3660,7 +3660,17 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast struct ast_channel *other; /* used later */ res = ast_channel_bridge(chan, peer, config, &f, &who); - + + if (ast_test_flag(chan, AST_FLAG_ZOMBIE) + || ast_test_flag(peer, AST_FLAG_ZOMBIE)) { + /* Zombies are present time to leave! */ + res = -1; + if (f) { + ast_frfree(f); + } + goto before_you_go; + } + /* When frame is not set, we are probably involved in a situation where we've timed out. When frame is set, we'll come this code twice; once for DTMF_BEGIN |