summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-03-18 00:22:23 +0000
committerRoger Dingledine <arma@torproject.org>2006-03-18 00:22:23 +0000
commitcf6ba3e76fbf628ced2977be9f35531a81dc84c9 (patch)
tree87791b46ac537629e00f54ac8ddc454dd1bcd1d7
parent4f14826cb39395d650800ce2d528141d58663085 (diff)
downloadtor-cf6ba3e76fbf628ced2977be9f35531a81dc84c9.tar.gz
tor-cf6ba3e76fbf628ced2977be9f35531a81dc84c9.zip
let an authdir that's not a naming authdir start even
if it doesn't have an approved-routers file. if it does, read it and parse it as usual. svn:r6182
-rw-r--r--src/or/circuitbuild.c4
-rw-r--r--src/or/dirserv.c9
-rw-r--r--src/or/routerlist.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 45905e8e3b..0ed3e84a13 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -996,8 +996,8 @@ new_route_len(double cw, uint8_t purpose, extend_info_t *exit,
purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)
routelen++;
#endif
- log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",routelen,
- smartlist_len(routers));
+ log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",
+ routelen, smartlist_len(routers));
num_acceptable_routers = count_acceptable_routers(routers);
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a78bfca7d7..7b8792f4b1 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -173,8 +173,13 @@ dirserv_parse_fingerprint_file(const char *fname)
cf = read_file_to_str(fname, 0);
if (!cf) {
- log_warn(LD_FS, "Cannot open fingerprint file %s", fname);
- return -1;
+ if (get_options()->NamingAuthoritativeDir) {
+ log_warn(LD_FS, "Cannot open fingerprint file '%s'. Failing.", fname);
+ return -1;
+ } else {
+ log_info(LD_FS, "Cannot open fingerprint file '%s'. Returning.", fname);
+ return 0;
+ }
}
result = config_get_lines(cf, &front);
tor_free(cf);
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 004b97b3ef..739f0b5623 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3245,7 +3245,7 @@ routers_update_status_from_networkstatus(smartlist_t *routers,
router->is_named = rs->status.is_named;
if (!authdir) {
- /* If we're an authdir, don't believe others. */
+ /* If we're not an authdir, believe others. */
router->is_verified = rs->status.is_valid;
router->is_running = rs->status.is_running;
router->is_fast = rs->status.is_fast;