From: Russell Bryant Date: Tue, 16 Dec 2008 21:10:44 +0000 (+0000) Subject: Do not dereference the channel if AST_PBX_KEEPALIVE has been returned. X-Git-Tag: 1.4.23-rc3~3^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c703960acc296129e87a92a366e4f94609d62275;p=thirdparty%2Fasterisk.git 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 --- diff --git a/apps/app_macro.c b/apps/app_macro.c index 7906ed4b2a..46ae71ccea 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -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);