[asterisk-bugs] [Asterisk 0016758]: [patch] zero/empty argument to gosub yields callers $ARG1

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 16 18:54:44 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16758 
====================================================================== 
Reported By:                wdoekes
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   16758
Category:                   Applications/app_stack
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     closed
Target Version:             1.6.2.7
Asterisk Version:           SVN 
JIRA:                       SWP-856 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 244392 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-02-02 15:34 CST
Last Modified:              2010-03-16 18:54 CDT
====================================================================== 
Summary:                    [patch] zero/empty argument to gosub yields callers
$ARG1
Description: 
Filed under app/app_stack as it's my most immediate problem, but it could
be filed under extensions.conf-parsing as well.

$ARG1..n behave like LOCAL() variables (I assume?). It's perfectly okay to
me that when I do not supply an Nth argument to a procedure, I get the
parents $ARGN instead. It is not okay, however, that my empty first
argument is ignored.

Two possible fixes:
- clean all the $ARGN's before entering the new frame (frame_set_var for
many arguments? expensive? not backward compatible)
- parse a zero-length argument list as one argument, not zero (depending
one where you do it, it could be okay)
====================================================================== 

---------------------------------------------------------------------- 
 (0119483) svnbot (reporter) - 2010-03-16 18:54
 https://issues.asterisk.org/view.php?id=16758#c119483 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 252979

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_stack.c

------------------------------------------------------------------------
r252979 | tilghman | 2010-03-16 18:54:43 -0500 (Tue, 16 Mar 2010) | 15
lines

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

........
  r252976 | tilghman | 2010-03-16 18:49:35 -0500 (Tue, 16 Mar 2010) | 8
lines
  
  Mask out previous arguments on each nested invocation of Gosub.
  (closes issue https://issues.asterisk.org/view.php?id=16758)
   Reported by: wdoekes
   Patches: 
         20100316__issue16758.diff.txt uploaded by tilghman (license 14)
   
  Review: https://reviewboard.asterisk.org/r/561/
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-16 18:54 svnbot         Checkin                                      
2010-03-16 18:54 svnbot         Note Added: 0119483                          
======================================================================




More information about the asterisk-bugs mailing list