[asterisk-commits] russell: trunk r163171 - /trunk/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 11 14:07:48 CST 2008
Author: russell
Date: Thu Dec 11 14:07:47 2008
New Revision: 163171
URL: http://svn.digium.com/view/asterisk?view=rev&rev=163171
Log:
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
Modified:
trunk/main/channel.c
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=163171&r1=163170&r2=163171
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu Dec 11 14:07:47 2008
@@ -460,8 +460,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;
More information about the asterisk-commits
mailing list