[Asterisk-cvs] asterisk/res res_agi.c,1.19,1.20
markster at lists.digium.com
markster at lists.digium.com
Wed Dec 22 21:51:19 CST 2004
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv28536/res
Modified Files:
res_agi.c
Log Message:
Fix AGI to know about "builtin" variables, too (bug #2737)
Index: res_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- res_agi.c 18 Dec 2004 22:04:07 -0000 1.19
+++ res_agi.c 23 Dec 2004 02:47:01 -0000 1.20
@@ -983,11 +983,13 @@
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");
More information about the svn-commits
mailing list