diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-12-11 20:07:47 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-12-11 20:07:47 +0000 |
commit | fb242bc8fd7821e640176b93950d158bce4ce87c (patch) | |
tree | bb7742683861723c8d9aa14557afdaecd0d0e17d | |
parent | 94172b4ba3d8fcde04571d55a8d993844c276299 (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@163171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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 b5a4054a4..d4d24b6a1 100644 --- a/main/channel.c +++ b/main/channel.c @@ -461,8 +461,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 (ast_tvzero(chan->whentohangup)) /* no if no hangup scheduled */ return 0; if (ast_tvdiff_ms(chan->whentohangup, ast_tvnow()) > 0) /* no if hangup time has not come yet. */ |