aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.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/dirserv.c
parentacd8bc1fd92e71c25570c161f0b3b9b1f4b766a7 (diff)
downloadtor-f0e7c4f0da87901584b4b03e7b50157ce607b88e.tar
tor-f0e7c4f0da87901584b4b03e7b50157ce607b88e.tar.gz
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/dirserv.c')
-rw-r--r--src/or/dirserv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e45a6ea8f..364337514 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1147,6 +1147,14 @@ directory_fetches_dir_info_like_bridge_user(or_options_t *options)
return options->UseBridges != 0;
}
+/** Return 1 if we want to cache v2 dir info (each status file).
+ */
+int
+directory_caches_v2_dir_info(or_options_t *options)
+{
+ return options->DirPort != 0;
+}
+
/** Return 1 if we want to keep descriptors, networkstatuses, etc around
* and we're willing to serve them to others. Else return 0.
*/