[asterisk-commits] tilghman: branch 1.2 r53069 - in /branches/1.2:
funcs/func_strings.c pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Feb 1 12:13:54 MST 2007
Author: tilghman
Date: Thu Feb 1 13:13:53 2007
New Revision: 53069
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53069
Log:
No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong
Modified:
branches/1.2/funcs/func_strings.c
branches/1.2/pbx.c
Modified: branches/1.2/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/funcs/func_strings.c?view=diff&rev=53069&r1=53068&r2=53069
==============================================================================
--- branches/1.2/funcs/func_strings.c (original)
+++ branches/1.2/funcs/func_strings.c Thu Feb 1 13:13:53 2007
@@ -41,13 +41,15 @@
static char *function_fieldqty(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
- char *varname, *varval, workspace[256];
+ char *varname, *varval;
char *delim = ast_strdupa(data);
int fieldcount = 0;
if (delim) {
varname = strsep(&delim, "|");
- pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
+ varval = pbx_builtin_getvar_helper(chan, varname);
+ if (varval)
+ varval = ast_strdupa(varval);
if (delim) {
while (strsep(&varval, delim))
fieldcount++;
Modified: branches/1.2/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/pbx.c?view=diff&rev=53069&r1=53068&r2=53069
==============================================================================
--- branches/1.2/pbx.c (original)
+++ branches/1.2/pbx.c Thu Feb 1 13:13:53 2007
@@ -974,8 +974,7 @@
return ret;
}
-/*! \brief pbx_retrieve_variable: Support for Asterisk built-in variables and
- functions in the dialplan
+/*! \brief pbx_retrieve_variable: Support for Asterisk built-in variables
---*/
void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
{
More information about the asterisk-commits
mailing list