diff options
author | Richard Mudgett <rmudgett@digium.com> | 2018-01-18 20:19:00 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2018-01-22 12:38:13 -0600 |
commit | 2f78dc2bfa9c16e3cea4ea3a7bbbf419741386b6 (patch) | |
tree | b98e8b5b47cb987112728dde6c223ed8d29b5a19 /include | |
parent | 908e39f186b20be766df57013a65d6ccf31632df (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/pbx.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index c8c171a71..a40c6a45b 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -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); /*! @} */ |