diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-11 20:09:10 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-11 20:09:10 +0000 |
commit | 6fc5efed5ac2c74b919b475605f5bd8d9078c600 (patch) | |
tree | 39d749001a4e7e2024e423c8a2e85e972144e683 /main | |
parent | 90b850a7bea2f380bfe75b3462019403795afde7 (diff) |
Merged revisions 163171 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r163171 | russell | 2008-12-11 14:07:47 -0600 (Thu, 11 Dec 2008) | 16 lines
Fix the "failed" extension for outgoing calls.
The conversion to use ast_check_hangup() everywhere instead of checking the softhangup
flag directly introduced this problem. The issue is that ast_check_hangup() checked
for tech_pvt to be NULL. Unfortunately, this will be NULL is some valid circumstances,
such as with a dummy channel.
The fix is simple. Don't check tech_pvt. It's pointless, because the code path that
sets this to NULL is when the channel hangup callback gets called. This happens inside
of ast_hangup(), which is the same function responsible for freeing the channel. Any
code calling ast_check_hangup() better not be calling it after that point, and if so,
we have a bigger problem at hand.
(closes issue #14035)
Reported by: erogoza
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@163172 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c index 90fccafd1..59d342121 100644 --- a/main/channel.c +++ b/main/channel.c @@ -465,8 +465,6 @@ int ast_check_hangup(struct ast_channel *chan) { if (chan->_softhangup) /* yes if soft hangup flag set */ return 1; - if (!chan->tech_pvt) /* yes if no technology private data */ - return 1; if (!chan->whentohangup) /* no if no hangup scheduled */ return 0; if (chan->whentohangup > time(NULL)) /* no if hangup time has not come yet. */ |