diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-15 21:25:19 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-15 21:25:19 +0000 |
commit | 56484aaf19dd122fc48b43cb9030d9aa99d74d23 (patch) | |
tree | e8cd98620aae4edeb208ff9b7c0a450b97057528 /apps/app_macro.c | |
parent | 7af450f49afb2d302a3f2db56f033ed8f4be0501 (diff) |
This change fixes bug 7731, macros not executing more than one level deep in a hung-up situation; also increased maximum recursion depth from 7 to 20, to keep serious coders from painful toe-stubbings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39909 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_macro.c')
-rw-r--r-- | apps/app_macro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index 8b46bf0f4..ed496e312 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -133,7 +133,7 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive) s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH"); if (s) sscanf(s, "%d", &depth); - if (depth >= 7) { + if (depth >= 20) { ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n"); LOCAL_USER_REMOVE(u); return 0; @@ -254,9 +254,9 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive) break; } /* don't stop executing extensions when we're in "h" */ - if (chan->_softhangup && strcasecmp(oldexten,"h")) { - ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n", - chan->exten, chan->priority); + if (chan->_softhangup && strcasecmp(chan->macroexten,"h")) { + ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n", + chan->exten, chan->macroexten, chan->priority); goto out; } chan->priority++; |