[asterisk-bugs] [Asterisk 0014629]: [patch] Add support in AEL for macro return values and direct assignment of them to variables and functions.
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Jan 22 00:54:08 CST 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=14629
======================================================================
Reported By: Marquis
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 14629
Category: PBX/pbx_ael
Reproducibility: N/A
Severity: feature
Priority: normal
Status: ready for review
Asterisk Version: SVN
JIRA: SWP-282
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-03-09 06:03 CDT
Last Modified: 2010-01-22 00:54 CST
======================================================================
Summary: [patch] Add support in AEL for macro return values
and direct assignment of them to variables and functions.
Description:
This patch adds macro return value and simple assignment support to AEL.
This is the bug report for review request 114 as per Russell Bryant.
http://reviewboard.digium.com/r/114/
======================================================================
----------------------------------------------------------------------
(0117057) crjw (reporter) - 2010-01-22 00:54
https://issues.asterisk.org/view.php?id=14629#c117057
----------------------------------------------------------------------
It seems that the parser always aways converts
"return ${xx}" to "Return($[${xx}])"
I am not sure why it must insert the extra dollar sign and square
brackets.
If variable ${x} happens to contain an embeded comma, a runtime warning is
generated and only the portion of the string before the comma is returned.
e.g.
Set(LOCAL(xx)=240,m); // A five character string with embeded
comma.
NoOp(${xx}); // The string "240,m" is displayed. Good so
far.
return ${xx}; // Nasty stuff starts to happen!
Here is the Warning:
WARNING[27604]: ast_expr2.fl:468 ast_yyerror: ast_yyerror(): syntax
error: syntax error, unexpected ',', expecting $end; Input:
240,m
^
Only the value 240 is returned. the comma and the letter m are stripped
out.
If I use "Return(${xx})" instead of "return ${xx}" then everything works,
but the parser generates standard warnings about using GoSub in AEL.
Issue History
Date Modified Username Field Change
======================================================================
2010-01-22 00:54 crjw Note Added: 0117057
======================================================================
More information about the asterisk-bugs
mailing list