Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS on has gone away already.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
BJ Weschke 20 years ago
parent 34bcd0e0b6
commit 81125d803e

@ -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;

Loading…
Cancel
Save