diff options
author | Mark Spencer <markster@digium.com> | 2003-08-16 20:40:42 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-08-16 20:40:42 +0000 |
commit | 7089f2415629d92f92c416c7cfea5a0976b3e1d1 (patch) | |
tree | 7bb0b6f26306d2d756862191a7806b624f5f75fd | |
parent | fff9b4ecba8f8404a745e36c6cfb79acad020f7a (diff) |
Strip out quotes (and leading/trailing spaces) in callerid_parse when dealing with name only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | callerid.c | 5 |
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; |