[asterisk-bugs] [Asterisk 0015114]: [patch] 'V' Command sets one variable only.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 18 13:58:27 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15114 
====================================================================== 
Reported By:                chris-mac
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15114
Category:                   Applications/app_externalivr
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!): 194609 
Request Review:              
====================================================================== 
Date Submitted:             2009-05-15 02:40 CDT
Last Modified:              2009-05-18 13:58 CDT
====================================================================== 
Summary:                    [patch] 'V' Command sets one variable only.
Description: 
Contrary to the documentation 'V' option doesn't set multiple variables
separated by comma:

V,name=value[,name=value[,name=value]]

It sets only first one, and other variables are ignored.

How to reproduce:
1. Use extensions.conf and test.sh attached.
2. Dial into Asterisk.
3. Press DTMF "1" when IVR is playing.

You will see only X-VAR1 is set, X-VAR2 is ignored.
====================================================================== 

---------------------------------------------------------------------- 
 (0104957) svnbot (reporter) - 2009-05-18 13:58
 https://issues.asterisk.org/view.php?id=15114#c104957 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 195316

U   trunk/apps/app_externalivr.c

------------------------------------------------------------------------
r195316 | mmichelson | 2009-05-18 13:58:27 -0500 (Mon, 18 May 2009) | 18
lines

Fix externalivr's setvariable command so that it properly sets multiple
variables.

The command had a for loop that was guaranteed to only execute once since
the continuation operation of the loop would set the input buffer NULL. I
rewrote
the loop so that its operation was more obvious, and it would set multiple
variables
correctly.

I also reduced stack space required for the function, constified the input
string,
and modified the function so that it would not modify the input string
while I was
at it.

(closes issue https://issues.asterisk.org/view.php?id=15114)
Reported by: chris-mac
Patches:
      15114.patch uploaded by mmichelson (license 60)
Tested by: chris-mac


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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-18 13:58 svnbot         Checkin                                      
2009-05-18 13:58 svnbot         Note Added: 0104957                          
======================================================================




More information about the asterisk-bugs mailing list