From 529951d632c2b49177bc9c382293a66492bb8678 Mon Sep 17 00:00:00 2001 From: file Date: Wed, 4 Mar 2009 19:24:59 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@180195 f38db490-d61c-443f-a65b-d21fe96a405b --- main/callerid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') 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" format or name 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, '"'))) { -- cgit v1.2.3