]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix logic error in searching for channel by name (bug #4684)
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 12 Jul 2005 16:00:23 +0000 (16:00 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 12 Jul 2005 16:00:23 +0000 (16:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6110 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index ef14f73e5b57a7f3eb8add7a62a17eaf4ac6f7c0..2bfe485e226b89d43aa16f5018b021f968b814d0 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -678,8 +678,12 @@ static struct ast_channel *channel_find_locked(const struct ast_channel *prev,
                                if (!name)
                                        break;
                                /* want match by full name */
-                               if (!namelen && !strcasecmp(c->name, name))
-                                       break;
+                               if (!namelen) {
+                                       if (!strcasecmp(c->name, name))
+                                               break;
+                                       else
+                                               continue;
+                               }
                                /* want match by name prefix */
                                if (!strncasecmp(c->name, name, namelen))
                                        break;