diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 02:47:01 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 02:47:01 +0000 |
commit | 793ee756c3b891f44d47b9c76015aaefde4ffba7 (patch) | |
tree | b6c650f54f0b99dbe62415668d8950a9464f1c31 /res/res_agi.c | |
parent | dbaa19588ac7e76c35c62894dcd2b3929ef16c89 (diff) |
Fix AGI to know about "builtin" variables, too (bug #2737)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4538 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rwxr-xr-x | res/res_agi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index e7bced29a..0572f0bd4 100755 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -983,11 +983,13 @@ 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 *tempstr; + char *ret; + char tempstr[1024]; if (argc != 3) return RESULT_SHOWUSAGE; - if ((tempstr = pbx_builtin_getvar_helper(chan, argv[2]))) - fdprintf(agi->fd, "200 result=1 (%s)\n", tempstr); + pbx_retrieve_variable(chan, argv[2], &ret, tempstr, sizeof(tempstr), NULL); + if (ret) + fdprintf(agi->fd, "200 result=1 (%s)\n", ret); else fdprintf(agi->fd, "200 result=0\n"); |