diff options
Diffstat (limited to 'pbx')
-rwxr-xr-x | pbx/pbx_ael.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 585b1e7b5..a56c87ba7 100755 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -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 == '=') { |