[asterisk-commits] file: branch 1.4 r180194 - /branches/1.4/main/callerid.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 4 13:22:56 CST 2009
Author: file
Date: Wed Mar 4 13:22:50 2009
New Revision: 180194
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180194
Log:
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)
Modified:
branches/1.4/main/callerid.c
Modified: branches/1.4/main/callerid.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/callerid.c?view=diff&rev=180194&r1=180193&r2=180194
==============================================================================
--- branches/1.4/main/callerid.c (original)
+++ branches/1.4/main/callerid.c Wed Mar 4 13:22:50 2009
@@ -971,7 +971,7 @@
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, '"'))) {
More information about the asterisk-commits
mailing list