diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-04 19:22:50 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-04 19:22:50 +0000 |
commit | dd0da2ee1254737d39438d886feaddfd030b607e (patch) | |
tree | 24aaa50fc6bb2326a6a64bf77cf46ec11c5caba4 /main | |
parent | 7b689f62ea813ab927582e36d6237a5ddb909ef0 (diff) |
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/branches/1.4@180194 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/callerid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/callerid.c b/main/callerid.c index d446ecbb8..bf4bca429 100644 --- a/main/callerid.c +++ b/main/callerid.c @@ -971,7 +971,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, '"'))) { |