[asterisk-bugs] [Asterisk 0016215]: A func_math WARNING for a operation that is not executed in ExecIf

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 10 08:46:52 CST 2009


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16215 
====================================================================== 
Reported By:                vrban
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   16215
Category:                   Applications/app_exec
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.27-rc4 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-11-10 08:31 CST
Last Modified:              2009-11-10 08:46 CST
====================================================================== 
Summary:                    A func_math WARNING for a operation that is not
executed in ExecIf
Description: 
I get a WARNING for a operation (in ExecIf) that i not executed. See
example below. It is redundant to show that WARNING when ExecIf does not
execute its operation.
====================================================================== 

---------------------------------------------------------------------- 
 (0113541) lmadsen (administrator) - 2009-11-10 08:46
 https://issues.asterisk.org/view.php?id=16215#c113541 
---------------------------------------------------------------------- 
Actually, because of the way things are expanded in Applications and
Functions (ExecIf() for example), this is expected behaviour. The inside
operations are evaluated first, and then ExecIf() determines whether to
follow up on the true or false statement.

So what you're seeing is the MATH() function getting evaluated and
returning a WARNING prior to anything being evaluated in ExecIf(). If it
were to be true, then the value that was evaluated by MATH() would have
been returned, otherwise, it is not returned; but it was still evaluated. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-10 08:46 lmadsen        Note Added: 0113541                          
2009-11-10 08:46 lmadsen        Status                   assigned => closed  
2009-11-10 08:46 lmadsen        Resolution               open => no change
required
======================================================================




More information about the asterisk-bugs mailing list