aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-23 17:06:32 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-23 17:06:32 +0000
commit6c1846310bea36407458a9b5113dd1d9140f18f0 (patch)
tree99be6cf9d09e02dd74dee375a808f075a2551f8b /res
parent89f4f69b34fd0689a41675a732b517e5689d3c09 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@40920 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 935e4f1d6..e9b275ed0 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1161,17 +1161,18 @@ 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)
{
- const char *ret;
+ 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
- ret = pbx_builtin_getvar_helper(chan, argv[2]);
+ } else {
+ pbx_retrieve_variable(chan, argv[2], &ret, tempstr, sizeof(tempstr), NULL);
+ }
if (ret)
fdprintf(agi->fd, "200 result=1 (%s)\n", ret);