ignore equals-signs inside parens (issue #5022)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 26 Aug 2005 20:08:28 +0000 (20:08 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 26 Aug 2005 20:08:28 +0000 (20:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6424 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_ael.c

index 585b1e7..a56c87b 100755 (executable)
@@ -435,8 +435,19 @@ static int match_assignment(char *variable, char **value)
 {
        char *c;
        char *ws;
+       int inpar = 0;
        c = variable;
-       while(*c && (*c > 32) && (*c != '=')) c++;
+       
+       while(*c && (*c > 32)) {
+         if(*c == ')' && (inpar > 0)) {
+           inpar--;
+         } else if(*c == '(' && (inpar >= 0)) {
+           inpar++;
+         } else if(*c == '=' && (inpar == 0)) {
+           break;
+         }
+         c++;
+       } 
        ws = c;
        while(*c && (*c < 33)) c++;
        if (*c == '=') {