Merged revisions 53070 via svnmerge from

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

................
r53070 | tilghman | 2007-02-01 13:21:20 -0600 (Thu, 01 Feb 2007) | 10 lines

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/trunk@53071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher 2007-02-01 19:27:22 +00:00
parent 38b87ec4b7
commit e5304e54cc
2 changed files with 7 additions and 4 deletions

View File

@ -48,7 +48,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static int function_fieldqty(struct ast_channel *chan, const 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);
@ -57,7 +58,6 @@ static int function_fieldqty(struct ast_channel *chan, const char *cmd,
AST_STANDARD_APP_ARGS(args, parse);
if (args.delim) {
pbx_retrieve_variable(chan, args.varname, &varval, buf, len, NULL);
if (args.delim[0] == '\\') {
if (args.delim[1] == 'n')
ast_copy_string(args.delim, "\n", 2);
@ -68,7 +68,10 @@ static int function_fieldqty(struct ast_channel *chan, const char *cmd,
else
ast_copy_string(args.delim, "-", 2);
}
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;

View File

@ -1097,7 +1097,7 @@ static char *substring(const char *value, int offset, int length, char *workspac
return ret;
}
/*! \brief Support for Asterisk built-in variables and functions in the dialplan
/*! \brief Support for Asterisk built-in variables in the dialplan
\note See also
- \ref AstVar Channel variables