]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When creating the secondary subchannel name, it is necessary to compare to
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 14 Aug 2008 16:47:30 +0000 (16:47 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 14 Aug 2008 16:47:30 +0000 (16:47 +0000)
the existing channel name without the "Zap/" or "DAHDI/" prefix, since our
test string is also without that prefix.
(closes issue #13027)
 Reported by: dferrer
 Patches:
       chan_zap-1.4.21.1_fix2.patch uploaded by dferrer (license 525)
       (Slightly modified by me, to compensate for both names)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137847 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 361c040b5edeccc34e8e707e07efa3adfae3ea97..0374925ba989282e02830f83e2a6b2db3a4bc5bc 100644 (file)
@@ -5270,7 +5270,7 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
                else    
                        b2 = ast_safe_string_alloc("%d-%d", i->channel, y);
                for (x = 0; x < 3; x++) {
-                       if ((index != x) && i->subs[x].owner && !strcasecmp(b2, i->subs[x].owner->name))
+                       if ((index != x) && i->subs[x].owner && !strcasecmp(b2, i->subs[x].owner->name + (strncmp(i->subs[x].owner->name, "Zap", 3) ? 4 : 6)))
                                break;
                }
                y++;