aboutsummaryrefslogtreecommitdiffstats
path: root/callerid.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 20:40:42 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 20:40:42 +0000
commit7db3f56426b9fa49ba86c15865528aeea9131d66 (patch)
tree7bb0b6f26306d2d756862191a7806b624f5f75fd /callerid.c
parentd8ae0621c1d53af85566638dd69033f024c5eb53 (diff)
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
Diffstat (limited to 'callerid.c')
-rwxr-xr-xcallerid.c5
1 files changed, 4 insertions, 1 deletions
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;