[asterisk-commits] tilghman: branch 1.2 r40901 -
/branches/1.2/res/res_agi.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Aug 23 09:05:26 MST 2006
Author: tilghman
Date: Wed Aug 23 11:05:26 2006
New Revision: 40901
URL: http://svn.digium.com/view/asterisk?rev=40901&view=rev
Log:
Revert last change - breaks retrieval of builtin variables
Modified:
branches/1.2/res/res_agi.c
Modified: branches/1.2/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_agi.c?rev=40901&r1=40900&r2=40901&view=diff
==============================================================================
--- branches/1.2/res/res_agi.c (original)
+++ branches/1.2/res/res_agi.c Wed Aug 23 11:05:26 2006
@@ -1161,17 +1161,18 @@
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);
More information about the asterisk-commits
mailing list