Merged revisions 53069 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53069 | tilghman | 2007-02-01 13:13:53 -0600 (Thu, 01 Feb 2007) | 2 lines

No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-02-01 19:21:20 +00:00
parent e86275c11c
commit 7e0a469bda
2 changed files with 7 additions and 5 deletions

View File

@@ -46,7 +46,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static int function_fieldqty(struct ast_channel *chan, char *cmd,
char *parse, char *buf, size_t len)
{
char *varval;
const char *varval;
char *varval2 = NULL;
int fieldcount = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(varname);
@@ -55,8 +56,10 @@ static int function_fieldqty(struct ast_channel *chan, char *cmd,
AST_STANDARD_APP_ARGS(args, parse);
if (args.delim) {
pbx_retrieve_variable(chan, args.varname, &varval, buf, len, NULL);
while (strsep(&varval, args.delim))
varval = pbx_builtin_getvar_helper(chan, args.varname);
if (varval)
varval2 = ast_strdupa(varval);
while (strsep(&varval2, args.delim))
fieldcount++;
} else {
fieldcount = 1;