mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 10:22:46 +00:00
Fixes CID pattern matching behavior to mirror that of extension pattern matching.
Pattern matching for extensions uses a type of scoring system, giving values for specificity to each character in the pattern. Unfortunately, this is done character by character, in order. This does lead to some less specific patterns being first in line for matching, but it will usually get the job done. This patch merely brings CID matching to the same level as extension matching. This patch does not attempt to tackle the problem shared by extension matching. (closes issue #14708) Reported by: klaus3000 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@218867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4853,7 +4853,7 @@ int ast_add_extension2(struct ast_context *con,
|
||||
else if (e->matchcid && !tmp->matchcid)
|
||||
res = -1;
|
||||
else
|
||||
res = strcasecmp(e->cidmatch, tmp->cidmatch);
|
||||
res = ext_cmp(e->cidmatch, tmp->cidmatch);
|
||||
}
|
||||
if (res >= 0)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user