Summary: | ASTERISK-15382: [patch] Bridge application fails when both channels have a similar name | ||
Reporter: | Sergio González Martín (telecos82) | Labels: | |
Date Opened: | 2009-12-30 09:45:07.000-0600 | Date Closed: | 2010-01-06 13:09:10.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | PBX/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) res_features_r236843.diff | |
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. | ||
Comments: | By: Ronald Chan (loloski) 2009-12-30 09:52:14.000-0600 wow, nice karma points telecos82 (Karma: +7409.00) ^_^ a bug!! By: Digium Subversion (svnbot) 2010-01-06 13:05:07.000-0600 Repository: asterisk Revision: 238134 U trunk/main/features.c ------------------------------------------------------------------------ r238134 | jpeeler | 2010-01-06 13:05:07 -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 ASTERISK-15382) Reported by: telecos82 Patches: res_features_r236843.diff uploaded by telecos82 (license 687) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=238134 By: Digium Subversion (svnbot) 2010-01-06 13:07:03.000-0600 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 ASTERISK-15382) Reported by: telecos82 Patches: res_features_r236843.diff uploaded by telecos82 (license 687) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=238135 By: Digium Subversion (svnbot) 2010-01-06 13:08:31.000-0600 Repository: asterisk Revision: 238136 _U branches/1.6.1/ U branches/1.6.1/main/features.c ------------------------------------------------------------------------ r238136 | jpeeler | 2010-01-06 13:08:31 -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 ASTERISK-15382) Reported by: telecos82 Patches: res_features_r236843.diff uploaded by telecos82 (license 687) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=238136 By: Digium Subversion (svnbot) 2010-01-06 13:09:09.000-0600 Repository: asterisk Revision: 238137 _U branches/1.6.2/ U branches/1.6.2/main/features.c ------------------------------------------------------------------------ r238137 | jpeeler | 2010-01-06 13:09:09 -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 ASTERISK-15382) Reported by: telecos82 Patches: res_features_r236843.diff uploaded by telecos82 (license 687) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=238137 |