From 7db3f56426b9fa49ba86c15865528aeea9131d66 Mon Sep 17 00:00:00 2001 From: markster Date: Sat, 16 Aug 2003 20:40:42 +0000 Subject: Strip out quotes (and leading/trailing spaces) in callerid_parse when dealing with name only git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1357 f38db490-d61c-443f-a65b-d21fe96a405b --- callerid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/callerid.c b/callerid.c index 984e449e2..59d9a6860 100755 --- a/callerid.c +++ b/callerid.c @@ -549,8 +549,11 @@ int ast_callerid_parse(char *instr, char **name, char **location) *name = NULL; *location = instr; } else { - /* Assume it's just a name */ + /* Assume it's just a name. Make sure it's not quoted though */ *name = instr; + while(*(*name) && ((*(*name) < 33) || (*(*name) == '\"'))) (*name)++; + ne = *name + strlen(*name) - 1; + while((ne > *name) && ((*ne < 33) || (*ne == '\"'))) { *ne = '\0'; ne--; } *location = NULL; } return 0; -- cgit v1.2.3