[asterisk-bugs] [Asterisk 0017145]: AEL warning when using Return() application is misleading

Asterisk Bug Tracker noreply at bugs.digium.com
Wed May 12 14:53:37 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17145 
====================================================================== 
Reported By:                okrief
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   17145
Category:                   Utilities/aelparse
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             1.6.2.9
Asterisk Version:           1.6.1.18 
JIRA:                       SWP-1274 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-04-07 01:00 CDT
Last Modified:              2010-05-12 14:53 CDT
====================================================================== 
Summary:                    AEL warning when using Return() application is
misleading
Description: 
When using Return() app in AEL script, CLI output includes:
[Apr  2 14:11:12] WARNING[2217]: ael/pval.c:2522 check_pval_item: Warning:
file /etc/asterisk/extensions.ael, line 660-660: application call to Return
affects flow of control, and needs to be re-written using AEL if, while,
goto, etc. keywords instead!
To my knowledge, using return keyword instead is not a desirable
replacement as you cannot add a value to it.

In UPGRADE-1.6.txt, you can read:
AEL:

* Macros are now implemented underneath with the Gosub() application.
  Heaven Help You if you wrote code depending on any aspect of this!
  Previous to 1.6, macros were implemented with the Macro() app, which
  provided a nice feature of auto-returning. The compiler will do its
  best to insert a Return() app call at the end of your macro if you did
  not include it, but really, you should make sure that all execution
  paths within your macros end in "return;".

My understanding of all this is that AEL warning is misleading as using
Return() is not deprecated. 
====================================================================== 

---------------------------------------------------------------------- 
 (0121834) svnbot (reporter) - 2010-05-12 14:53
 https://issues.asterisk.org/view.php?id=17145#c121834 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 262799

_U  branches/1.6.2/
U   branches/1.6.2/res/ael/pval.c

------------------------------------------------------------------------
r262799 | lmadsen | 2010-05-12 14:53:36 -0500 (Wed, 12 May 2010) | 15
lines

Merged revisions 262798 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r262798 | lmadsen | 2010-05-12 14:53:10 -0500 (Wed, 12 May 2010) | 7
lines
  
  Revert previous WARNING message removal.
  
  Marquis42 suggested a better method of doing what I wanted because I
ended up
  removing the WARNING message for all instances when really I just wanted
to
  remove it for the 'return' keyword, not everything.
  
  (issue https://issues.asterisk.org/view.php?id=17145)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=262799 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-12 14:53 svnbot         Checkin                                      
2010-05-12 14:53 svnbot         Note Added: 0121834                          
======================================================================




More information about the asterisk-bugs mailing list