mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
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.2@53069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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++;
|
||||
|
||||
@@ -974,8 +974,7 @@ static char *substring(const char *value, int offset, int length, char *workspac
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user