aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-15 22:51:49 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-15 22:51:49 +0000
commitcf9d8c40b69e7a50f6e4ddef3784ca61e4e64ae6 (patch)
tree3ccd1226ea2e079afe920c99329c9e71e6753db9 /res/res_agi.c
parentfd77a5a34f7596fd4a27df23b4f7a46c5b22290c (diff)
Merged revisions 39935 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r39935 | russell | 2006-08-15 18:49:41 -0400 (Tue, 15 Aug 2006) | 3 lines use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve global variables (issue #7609) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39936 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index d12de6e2d..571e25279 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1166,18 +1166,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)) ? NULL : 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);