mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
fix logic error in searching for channel by name (bug #4684)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user