diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-18 17:45:48 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-18 17:45:48 +0000 |
commit | 1ce148716c373a9f14b07c24b66107f52a9393a0 (patch) | |
tree | ccb920662eea11408952b9d9198d738bc5f3564d /main/rtp.c | |
parent | 68c3cbe696aa370bab53ea26b036b08729cbbaef (diff) |
Merged revisions 103780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103780 | tilghman | 2008-02-18 11:31:52 -0600 (Mon, 18 Feb 2008) | 9 lines
When a SIP channel is being auto-destroyed, it's possible for it to still be
in bridge code. When that happens, we crash. Delay the RTP destruction until
the bridge is ended.
(closes issue #11960)
Reported by: norman
Patches:
20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: norman
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103781 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r-- | main/rtp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/rtp.c b/main/rtp.c index 1260aff7d..f7078de5e 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -3713,6 +3713,14 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel ast_channel_lock(c0); } + /* Ensure neither channel got hungup during lock avoidance */ + if (ast_check_hangup(c0) || ast_check_hangup(c1)) { + ast_log(LOG_WARNING, "Got hangup while attempting to bridge '%s' and '%s'\n", c0->name, c1->name); + ast_channel_unlock(c0); + ast_channel_unlock(c1); + return AST_BRIDGE_FAILED; + } + /* Find channel driver interfaces */ if (!(pr0 = get_proto(c0))) { ast_log(LOG_WARNING, "Can't find native functions for channel '%s'\n", c0->name); |