mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Merged revisions 8074 via svnmerge from
/branches/1.2 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -50,8 +50,12 @@ static char *function_fieldqty(struct ast_channel *chan, char *cmd, char *data,
|
||||
if (delim) {
|
||||
varname = strsep(&delim, "|");
|
||||
pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
|
||||
while (strsep(&varval, delim))
|
||||
fieldcount++;
|
||||
if (delim) {
|
||||
while (strsep(&varval, delim))
|
||||
fieldcount++;
|
||||
} else if (!ast_strlen_zero(varval)) {
|
||||
fieldcount = 1;
|
||||
}
|
||||
snprintf(buf, len, "%d", fieldcount);
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Out of memory\n");
|
||||
|
Reference in New Issue
Block a user