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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Sep 1 20:21:57 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
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:                     closed
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 20:21 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0109994) svnbot (reporter) - 2009-09-01 20:21
 https://issues.asterisk.org/view.php?id=15810#c109994 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 215352

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

------------------------------------------------------------------------
r215352 | dhubbard | 2009-09-01 20:21:56 -0500 (Tue, 01 Sep 2009) | 25
lines

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

................
  r215338 | dhubbard | 2009-09-01 20:16:59 -0500 (Tue, 01 Sep 2009) | 18
lines
  
  Merged revisions 215270 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r215270 | dhubbard | 2009-09-01 18:04:52 -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=215352 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-01 20:21 svnbot         Checkin                                      
2009-09-01 20:21 svnbot         Note Added: 0109994                          
======================================================================




More information about the asterisk-bugs mailing list