[asterisk-bugs] [Asterisk 0015244]: [patch] Invalid syntax with two ampersands in if block

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Jan 10 16:35:54 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15244 
====================================================================== 
Reported By:                atis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15244
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     ready for testing
Target Version:             1.4.30
Asterisk Version:           SVN 
JIRA:                       SWP-519 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-06-01 11:46 CDT
Last Modified:              2010-01-10 16:35 CST
====================================================================== 
Summary:                    [patch] Invalid syntax with two ampersands in if
block
Description: 
Using syntax:

if (${a}=1 && ${b}=2) {

}

would generate a bad .conf file with:

GotoIf($[${a}=1 && ${b}=2]) which would always return false.

While it would be a feature to add support for double ampersands within IF
block, it's still a good to warn users about such syntax mistakes
====================================================================== 

---------------------------------------------------------------------- 
 (0116425) tilghman (administrator) - 2010-01-10 16:35
 https://issues.asterisk.org/view.php?id=15244#c116425 
---------------------------------------------------------------------- 
I think the actual issue is that the '&&', '||', and '==' are not getting
properly parsed by the expression parser, even though they're meant to.  I
have uploaded a patch that should fix this oversight. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-10 16:35 tilghman       Note Added: 0116425                          
======================================================================




More information about the asterisk-bugs mailing list