]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 180195 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 4 Mar 2009 19:27:00 +0000 (19:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 4 Mar 2009 19:27:00 +0000 (19:27 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r180195 | file | 2009-03-04 15:24:59 -0400 (Wed, 04 Mar 2009) | 11 lines

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

  ........
    r180194 | file | 2009-03-04 15:22:50 -0400 (Wed, 04 Mar 2009) | 4 lines

    Look for the number in a callerid string starting from the end. This way a value using <> can exist in the name portion.

    (issue #AST-194)
  ........
................

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

main/callerid.c

index 29afeb4da5b7a628dd85e94acceb42c5b00341d5..6bb5c95bfd24166fd2a95b7df7226de137f670a1 100644 (file)
@@ -1008,7 +1008,7 @@ int ast_callerid_parse(char *instr, char **name, char **location)
        char *ns, *ne, *ls, *le;
 
        /* Try "name" <location> format or name <location> format */
-       if ((ls = strchr(instr, '<')) && (le = strchr(ls, '>'))) {
+       if ((ls = strrchr(instr, '<')) && (le = strrchr(ls, '>'))) {
                *ls = *le = '\0';       /* location found, trim off the brackets */
                *location = ls + 1;     /* and this is the result */
                if ((ns = strchr(instr, '"')) && (ne = strchr(ns + 1, '"'))) {