mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
pbx_variables.c: Misc fixes in variable substitution.
* Copy more than one character at a time when there is nothing to substitute. * Fix off by one error if a '}' or ']' is missing. * Eliminated the requirement that the "used" parameter had to point to a variable. The current callers were always declaring a variable to meet the requirement and discarding the value put into that variable. Now it can be NULL. * In ast_str_substitute_variables_full() fixed using the bogus channel to evaluate a function. We were not using the bogus channel we just created to help evaluate a subexpression. Change-Id: Ia83d99f4f16abe47f329eb39b6ff2013ae7c9854
This commit is contained in:
@@ -1432,7 +1432,7 @@ void ast_str_substitute_variables_varshead(struct ast_str **buf, ssize_t maxlen,
|
||||
* \param c Channel variables from which to extract values, and channel to pass to any dialplan functions.
|
||||
* \param headp If no channel is specified, a channel list from which to extract variable values
|
||||
* \param templ Variable template to expand.
|
||||
* \param used Number of bytes read from the template.
|
||||
* \param used Number of bytes read from the template. (May be NULL)
|
||||
*/
|
||||
void ast_str_substitute_variables_full(struct ast_str **buf, ssize_t maxlen, struct ast_channel *c, struct varshead *headp, const char *templ, size_t *used);
|
||||
/*! @} */
|
||||
|
||||
Reference in New Issue
Block a user