[asterisk-bugs] [Asterisk 0016528]: [patch] Bridge application fails when both channels have a similar name

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 6 13:07:04 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16528 
====================================================================== 
Reported By:                telecos82
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   16528
Category:                   PBX/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                       SWP-618 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 236843 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-12-30 09:45 CST
Last Modified:              2010-01-06 13:07 CST
====================================================================== 
Summary:                    [patch] Bridge application fails when both channels
have a similar name
Description: 
I've found that when two channels have a similar name (one channel name
contains the other one), for example "IAX2/Corp-1" and "IAX2/Corp-16548",
the Bridge application fails giving the following warning message "Unable
to bridge channel IAX2/Corp-1 with itself".

It's due to the fact that we are comparing only the first 'n' characters
(with strncmp) of both strings where 'n' is the lesser of both string
lengths. The problem can be solved by comparing the whole strings with
strcmp instead of strncmp.
====================================================================== 

---------------------------------------------------------------------- 
 (0116145) svnbot (reporter) - 2010-01-06 13:07
 https://issues.asterisk.org/view.php?id=16528#c116145 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 238135

_U  branches/1.6.0/
U   branches/1.6.0/main/features.c

------------------------------------------------------------------------
r238135 | jpeeler | 2010-01-06 13:07:03 -0600 (Wed, 06 Jan 2010) | 17
lines

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

........
  r238134 | jpeeler | 2010-01-06 13:05:06 -0600 (Wed, 06 Jan 2010) | 10
lines
  
  Fix channel name comparison for bridge application.
  
  The channel name comparison was not comparing the whole string and
therefore
  if one channel name was a substring of the other, the bridge would fail.
  
  (closes issue https://issues.asterisk.org/view.php?id=16528)
  Reported by: telecos82
  Patches: 
        res_features_r236843.diff uploaded by telecos82 (license 687)
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-06 13:07 svnbot         Checkin                                      
2010-01-06 13:07 svnbot         Note Added: 0116145                          
======================================================================




More information about the asterisk-bugs mailing list