Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2008-12-16 21:10:44 +00:00
parent aa60ad0e43
commit c703960acc

View File

@@ -322,8 +322,8 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
else if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
dead = 1;
goto out;
break;
default:
if (option_debug)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);