summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-08-23 16:14:18 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-08-23 16:14:18 +0000
commitec7bd6614aa48dda33badc26be909b15c49b30cb (patch)
tree668d860eb51bc300b6ff414962b9b98d06bd7486 /res
parent4c41a6ccd0f13af9510b7f7927fb763da4c86c32 (diff)
Merged revisions 40901 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r40901 | tilghman | 2006-08-23 11:05:26 -0500 (Wed, 23 Aug 2006) | 2 lines Revert last change - breaks retrieval of builtin variables ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 99d1d0c6a..a050d1c8d 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1164,17 +1164,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)) ? NULL : 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);