]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx_variables.c: Misc fixes in variable substitution.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 19 Jan 2018 02:19:00 +0000 (20:19 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 22 Jan 2018 18:38:02 +0000 (12:38 -0600)
commit7db460623525f449bfca6d77d135239a2dddad18
tree6af2b4724b86b255415d38158eea8b0c1ac26ae3
parent4ed832afbb2f3c3d0acd9efc994d8f199a9d38e2
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
include/asterisk/pbx.h
main/pbx_variables.c