mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
lowercase exit policies.
svn:r556
This commit is contained in:
parent
9e30ac2870
commit
3b2943d845
@ -952,11 +952,13 @@ int router_add_exit_policy_from_string(routerinfo_t *router,
|
|||||||
directory_token_t tok;
|
directory_token_t tok;
|
||||||
char *tmp, *cp;
|
char *tmp, *cp;
|
||||||
int r;
|
int r;
|
||||||
int len;
|
int len, idx;
|
||||||
|
|
||||||
len = strlen(s);
|
len = strlen(s);
|
||||||
tmp = cp = tor_malloc(len+2);
|
tmp = cp = tor_malloc(len+2);
|
||||||
strcpy(tmp, s);
|
for (idx = 0; idx < len; ++idx) {
|
||||||
|
tmp[idx] = tolower(s[idx]);
|
||||||
|
}
|
||||||
tmp[len]='\n';
|
tmp[len]='\n';
|
||||||
tmp[len+1]='\0';
|
tmp[len+1]='\0';
|
||||||
if (router_get_next_token(&cp, &tok)) {
|
if (router_get_next_token(&cp, &tok)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user