diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-13 19:55:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-13 19:55:40 +0000 |
commit | 508970f85dfe4539cfbfdfde556ed65b185331cd (patch) | |
tree | 979c075da571f680dff9616dadca5f06b660b7f2 /src/or/config.c | |
parent | f14117bffdf22894d565e9c21c535bf06298f6cd (diff) | |
download | tor-508970f85dfe4539cfbfdfde556ed65b185331cd.tar tor-508970f85dfe4539cfbfdfde556ed65b185331cd.tar.gz |
fix typo
svn:r2466
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/or/config.c b/src/or/config.c index 27d133e1a..52e8c0241 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -397,6 +397,10 @@ int config_assign_default_dirservers(void) { return -1; } + return 0; +} + +static void add_default_trusted_dirservers(void) { /* moria1 */ parse_dir_server_line("18.244.0.188:9031 " "FFCB 46DB 1339 DA84 674C 70D7 CB58 6434 C437 0441"); @@ -406,8 +410,6 @@ int config_assign_default_dirservers(void) { /* tor26 */ parse_dir_server_line("62.116.124.106:9030 " "847B 1F85 0344 D787 6491 A548 92F9 0493 4E4E B85D"); - - return 0; } /** Set <b>options</b> to a reasonable default. @@ -892,9 +894,15 @@ int getconfig(int argc, char **argv, or_options_t *options) { } } - for (cl = options->DirServers; cl; cl = cl->next) { - if (parse_dir_server_line(cl->value)<0) - return -1; + + clear_trusted_dir_servers(); + if (!options->DirServers) { + add_default_trusted_dirservers(); + } else { + for (cl = options->DirServers; cl; cl = cl->next) { + if (parse_dir_server_line(cl->value)<0) + return -1; + } } /* XXX look at the various nicknamelists and make sure they're |