mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
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.4@180194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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, '"'))) {
|
||||
|
||||
Reference in New Issue
Block a user