aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 21:10:44 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 21:10:44 +0000
commita9fd8bb1b05d97a3f3fae4ff3ad2db170b1b8c5c (patch)
tree5654e36ce6fde91e85e97a20fa6bdb8ef5d2d19b /apps
parent36859c4621a812e1290f482a6cad0d2943cf60aa (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@164876 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_macro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c
index 7906ed4b2..46ae71cce 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);