]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
This revision fixes bug 7731, the inability for macros to be called more than one...
authorSteve Murphy <murf@digium.com>
Tue, 15 Aug 2006 22:13:47 +0000 (22:13 +0000)
committerSteve Murphy <murf@digium.com>
Tue, 15 Aug 2006 22:13:47 +0000 (22:13 +0000)
It also pushes up the limit of recursion depth from 7 to 20.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39931 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_macro.c

index 745bf4e3652f2108dc59207000b3707d3bd4318f..4fb3360257c4190cb2b8aa15881763f86f24ba26 100644 (file)
@@ -127,7 +127,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
                depth = 0;
        }
 
-       if (depth >= 7) {
+       if (depth >= 20) {
                ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
                LOCAL_USER_REMOVE(u);
                return 0;
@@ -241,9 +241,9 @@ static int macro_exec(struct ast_channel *chan, void *data)
                        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++;