[Home]

Summary:ASTERISK-15921: AEL warning when using Return() application is misleading
Reporter:Olivier Krief (okrief)Labels:
Date Opened:2010-04-07 01:00:33Date Closed:2010-05-12 14:53:37
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Utilities/aelparse
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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.
Comments:By: Leif Madsen (lmadsen) 2010-04-09 12:34:00

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.

By: Digium Subversion (svnbot) 2010-05-12 14:31:43

Repository: asterisk
Revision: 262796

U   trunk/res/ael/pval.c

------------------------------------------------------------------------
r262796 | lmadsen | 2010-05-12 14:31:42 -0500 (Wed, 12 May 2010) | 4 lines

Remove unnecessary WARNING message in ael/pval.c

(closes issue ASTERISK-15921)
Reported by: okrief
------------------------------------------------------------------------

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

By: Digium Subversion (svnbot) 2010-05-12 14:32:05

Repository: asterisk
Revision: 262797

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

------------------------------------------------------------------------
r262797 | lmadsen | 2010-05-12 14:32:05 -0500 (Wed, 12 May 2010) | 12 lines

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

........
 r262796 | lmadsen | 2010-05-12 14:31:42 -0500 (Wed, 12 May 2010) | 4 lines
 
 Remove unnecessary WARNING message in ael/pval.c
 
 (closes issue ASTERISK-15921)
 Reported by: okrief
........

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

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

By: Digium Subversion (svnbot) 2010-05-12 14:53:10

Repository: asterisk
Revision: 262798

U   trunk/res/ael/pval.c

------------------------------------------------------------------------
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 ASTERISK-15921)
------------------------------------------------------------------------

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

By: Digium Subversion (svnbot) 2010-05-12 14:53:37

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 ASTERISK-15921)
........

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

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