mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00: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++;
|
||||
|
Reference in New Issue
Block a user