projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fff9b4e
)
Strip out quotes (and leading/trailing spaces) in callerid_parse when dealing with...
author
Mark Spencer
<markster@digium.com>
Sat, 16 Aug 2003 20:40:42 +0000
(20:40 +0000)
committer
Mark Spencer
<markster@digium.com>
Sat, 16 Aug 2003 20:40:42 +0000
(20:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1357
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
callerid.c
patch
|
blob
|
history
diff --git
a/callerid.c
b/callerid.c
index
984e449
..
59d9a68
100755
(executable)
--- 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;