]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 218868 via svnmerge from
authorDavid Brooks <dbrooks@digium.com>
Wed, 16 Sep 2009 18:11:13 +0000 (18:11 +0000)
committerDavid Brooks <dbrooks@digium.com>
Wed, 16 Sep 2009 18:11:13 +0000 (18:11 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r218868 | dbrooks | 2009-09-16 13:06:42 -0500 (Wed, 16 Sep 2009) | 20 lines

  Merged revisions 218867 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r218867 | dbrooks | 2009-09-16 13:00:45 -0500 (Wed, 16 Sep 2009) | 13 lines

    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.6.0@218869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index a817822982ecd3f73a55d3bc7daba5a78eb9ef1b..26a5e3887c914a46b1d3c2924a2ee50aef832ac9 100644 (file)
@@ -6864,7 +6864,7 @@ static int ast_add_extension2_lockopt(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;