[asterisk-bugs] [Asterisk 0015810]: [patch] SoftHangup() incorrectly truncates multi-hyphen channel names

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Sep 1 18:05:36 CDT 2009


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15810 
====================================================================== 
Reported By:                dhubbard
Assigned To:                dhubbard
====================================================================== 
Project:                    Asterisk
Issue ID:                   15810
Category:                   Applications/app_softhangup
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.4.26.1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 215252 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-09-01 17:37 CDT
Last Modified:              2009-09-01 18:05 CDT
====================================================================== 
Summary:                    [patch] SoftHangup() incorrectly truncates
multi-hyphen channel names
Description: 
The SoftHangup application assumes that a channel name will only have one
hyphen in it (ala Foo/Bar-Z) and cuts the channel name at the first hyphen.
 The dialplan snippet in the Additional Information section will result in
an incorrectly cut channel name:

[Sep  1 17:07:03] NOTICE[1355]: app_softhangup.c:81 softhangup_exec:
before cut: 'Local/my-multi-hyphen at default-56a3,2'
[Sep  1 17:07:03] NOTICE[1355]: app_softhangup.c:93 softhangup_exec: after
cut: 'Local/my'

SoftHangup should start at the end of the string and cut the channel name
at the last hyphen.

This bug affects all versions of Asterisk.
====================================================================== 

---------------------------------------------------------------------- 
 (0109981) svnbot (reporter) - 2009-09-01 18:05
 https://issues.asterisk.org/view.php?id=15810#c109981 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 215270

U   branches/1.4/apps/app_softhangup.c

------------------------------------------------------------------------
r215270 | dhubbard | 2009-09-01 18:05:35 -0500 (Tue, 01 Sep 2009) | 12
lines

Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel
names

In general channel names are in the form Foo/Bar-Z, but the channel name
could have multiple hyphens and look like Foo/B-a-r-Z.  Use strrchr to
truncate the channel name at the last hyphen.

(closes issue https://issues.asterisk.org/view.php?id=15810)
Reported by: dhubbard
Patches:
      dw-softhangup-1.4.patch uploaded by dhubbard (license 733)


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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-01 18:05 svnbot         Checkin                                      
2009-09-01 18:05 svnbot         Note Added: 0109981                          
2009-09-01 18:05 svnbot         Status                   assigned => resolved
2009-09-01 18:05 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list