Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS on has gone away already.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9139 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
d36e97804d
commit
3d8a107846
|
@ -394,7 +394,7 @@ static int local_hangup(struct ast_channel *ast)
|
|||
isoutbound = IS_OUTBOUND(ast, p);
|
||||
if (isoutbound) {
|
||||
status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");
|
||||
if(status)
|
||||
if ((status) && (p->owner))
|
||||
pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status);
|
||||
p->chan = NULL;
|
||||
p->launchedpbx = 0;
|
||||
|
|
Reference in New Issue