summaryrefslogtreecommitdiff
path: root/main/callerid.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-03-04 19:24:59 +0000
committerJoshua Colp <jcolp@digium.com>2009-03-04 19:24:59 +0000
commita66032a14a4d85f45b2eeb2cfb17f84177551c24 (patch)
treef2c5b0154e334ad07959a88d5cd9a07f5a54b48e /main/callerid.c
parent3a14487abf101cb3fb567bc17def47b0eb6c0bdf (diff)
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/trunk@180195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/callerid.c')
-rw-r--r--main/callerid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/callerid.c b/main/callerid.c
index 603ac2722..89b978881 100644
--- a/main/callerid.c
+++ b/main/callerid.c
@@ -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, '"'))) {