[asterisk-bugs] [Asterisk 0015557]: [patch] Gosub() dequotes once more than Macro()
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Aug 6 16:34:17 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15557
======================================================================
Reported By: rain
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 15557
Category: Applications/app_stack
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: Older 1.6.0
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-07-22 15:33 CDT
Last Modified: 2009-08-06 16:34 CDT
======================================================================
Summary: [patch] Gosub() dequotes once more than Macro()
Description:
Since Gosub started accepting "macro" arguments (before 1.6.0-beta1), it
has been dequoting arguments one more time than Macro does.
Since Gosub() is meant to supplant Macro() in 1.6 and is already used by
AEL to implement macros, this breaks compatibility with 1.4. This behavior
also makes it impossible to fetch arguments without quotes being
interpreted, which IS possible in a Macro() call through ${ARGn}. It also
requires an obnoxious level of quoting if you want quotes to survive all
the way to a named macro argument in AEL -- e.g.
¯o(${QUOTE(${QUOTE(${CALLERID(all)})})});
Behind the scenes, Gosub() uses AST_STANDARD_APP_ARGS, which causes
ast_app_separate_args() to eat the quotes; Macro() does its own argument
parsing. I think the best solution is probably to make Gosub() use
non-standard argument parsing as well, but I haven't written a patch yet
since I think this warrants more discussion.
I verified that this problem exists in 1.6.0-beta1, 1.6.0.10, and 1.6.11.
It does not exist in 1.4 because Gosub() doesn't accept extra arguments.
======================================================================
----------------------------------------------------------------------
(0108737) svnbot (reporter) - 2009-08-06 16:34
https://issues.asterisk.org/view.php?id=15557#c108737
----------------------------------------------------------------------
Repository: asterisk
Revision: 210910
_U branches/1.6.1/
U branches/1.6.1/apps/app_stack.c
U branches/1.6.1/include/asterisk/app.h
U branches/1.6.1/main/app.c
------------------------------------------------------------------------
r210910 | tilghman | 2009-08-06 16:34:16 -0500 (Thu, 06 Aug 2009) | 16
lines
Merged revisions 210908 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r210908 | tilghman | 2009-08-06 16:29:26 -0500 (Thu, 06 Aug 2009) | 9
lines
Allow Gosub to recognize quote delimiters without consuming them.
(closes issue https://issues.asterisk.org/view.php?id=15557)
Reported by: rain
Patches:
20090723__issue15557.diff.txt uploaded by tilghman (license 14)
Tested by: rain
Review: https://reviewboard.asterisk.org/r/316/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=210910
Issue History
Date Modified Username Field Change
======================================================================
2009-08-06 16:34 svnbot Checkin
2009-08-06 16:34 svnbot Note Added: 0108737
======================================================================
More information about the asterisk-bugs
mailing list