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

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Apr 9 12:34:00 CDT 2010


The following issue requires your FEEDBACK. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17145 
====================================================================== 
Reported By:                okrief
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17145
Category:                   Utilities/aelparse
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.1.18 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-07 01:00 CDT
Last Modified:              2010-04-09 12:34 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. 
====================================================================== 

---------------------------------------------------------------------- 
 (0120238) lmadsen (administrator) - 2010-04-09 12:34
 https://issues.asterisk.org/view.php?id=17145#c120238 
---------------------------------------------------------------------- 
Well, I'd say this is a borderline feature request. The 'return' keyword,
from my understanding, is calling Return() -- it just doesn't provide the
ability to set a return string.

Someone who knows more about AEL than me though probably needs to comment
on this. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-09 12:34 lmadsen        Note Added: 0120238                          
2010-04-09 12:34 lmadsen        Status                   new => feedback     
======================================================================




More information about the asterisk-bugs mailing list