]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
properly handle brace-wrapped strings in variable/function references in the dialplan
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 18 Apr 2006 23:31:10 +0000 (23:31 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 18 Apr 2006 23:31:10 +0000 (23:31 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 9ef1c1936e2dc5c89c7bb690f94f7643c91d512d..183a0acda0910988de7d53054359ed67ed7155f0 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -1471,9 +1471,10 @@ static void pbx_substitute_variables_helper_full(struct ast_channel *c, struct v
                        needsub = 0;
 
                        /* Find the end of it */
-                       while(brackets && *vare) {
+                       while (brackets && *vare) {
                                if ((vare[0] == '$') && (vare[1] == '{')) {
                                        needsub++;
+                               } else if (vare[0] == '{') {
                                        brackets++;
                                } else if (vare[0] == '}') {
                                        brackets--;