aboutsummaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-20 06:47:59 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-20 06:47:59 +0000
commitf0e7c4f0da87901584b4b03e7b50157ce607b88e (patch)
tree7f76e6f37f14f82132ef1b89ea946d990503c413 /src/or/networkstatus.c
parentacd8bc1fd92e71c25570c161f0b3b9b1f4b766a7 (diff)
downloadtor-f0e7c4f0da87901584b4b03e7b50157ce607b88e.tar.gz
tor-f0e7c4f0da87901584b4b03e7b50157ce607b88e.zip
Only Tors that want to mirror the v2 directory info should
create the "cached-status" directory in their datadir. All Tors used to create it. Bugfix on 0.1.2.x. Bridge relays with DirPort set to 0 no longer cache v1 or v2 directory information; there's no point. Bugfix on trunk. svn:r12887
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 28d0010ff7..54b92a8fa3 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -495,7 +495,7 @@ add_networkstatus_to_cache(const char *s,
tor_free(fn);
}
- if (directory_caches_dir_info(get_options()))
+ if (directory_caches_v2_dir_info(get_options()))
dirserv_set_cached_networkstatus_v2(s,
ns->identity_digest,
ns->published_on);
@@ -540,7 +540,7 @@ router_set_networkstatus_v2(const char *s, time_t arrived_at,
char fp[HEX_DIGEST_LEN+1];
char published[ISO_TIME_LEN+1];
- if (!directory_caches_dir_info(get_options()))
+ if (!directory_caches_v2_dir_info(get_options()))
return 0; /* Don't bother storing it. */
ns = networkstatus_v2_parse_from_string(s);
@@ -721,7 +721,7 @@ networkstatus_v2_list_clean(time_t now)
unlink(fname);
}
tor_free(fname);
- if (directory_caches_dir_info(get_options())) {
+ if (directory_caches_v2_dir_info(get_options())) {
dirserv_set_cached_networkstatus_v2(NULL, ns->identity_digest, 0);
}
networkstatus_v2_free(ns);