]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 15 Aug 2006 23:04:36 +0000 (23:04 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 15 Aug 2006 23:04:36 +0000 (23:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39962 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_macro.c
res/res_agi.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++;
index e9b275ed0b8e2b7a9d7d605315ccfbdfe033df1a..935e4f1d6083f089584729664a1d5522c7f38481 100644 (file)
@@ -1161,18 +1161,17 @@ static int handle_setvariable(struct ast_channel *chan, AGI *agi, int argc, char
 
 static int handle_getvariable(struct ast_channel *chan, AGI *agi, int argc, char **argv)
 {
-       char *ret;
+       const char *ret;
        char tempstr[1024];
 
        if (argc != 3)
                return RESULT_SHOWUSAGE;
 
        /* check if we want to execute an ast_custom_function */
-       if (!ast_strlen_zero(argv[2]) && (argv[2][strlen(argv[2]) - 1] == ')')) {
+       if (!ast_strlen_zero(argv[2]) && (argv[2][strlen(argv[2]) - 1] == ')'))
                ret = ast_func_read(chan, argv[2], tempstr, sizeof(tempstr));
-       } else {
-               pbx_retrieve_variable(chan, argv[2], &ret, tempstr, sizeof(tempstr), NULL);
-       }
+       else
+               ret = pbx_builtin_getvar_helper(chan, argv[2]);
 
        if (ret)
                fdprintf(agi->fd, "200 result=1 (%s)\n", ret);