]> 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:32:37 +0000 (12:32 -0600)
commit85b384728c550129416d419df8a9eb12a75ef368
tree07e4ec85941b3670e859c7c1acbf7c9b875db6f8
parent31b501c1a7b14b7558a9883d814927fffb21a178
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