aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-01 20:13:49 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-01 20:13:49 +0000
commit89ab267cfbf1994b6b82a7de107fde5337aa485a (patch)
treeaefd51d54d5eba93e269b066c65fc084f0de6969 /src/or/routerlist.c
parent0faaa16b0cb876d01f9267b047a642da477a0c52 (diff)
downloadtor-89ab267cfbf1994b6b82a7de107fde5337aa485a.tar
tor-89ab267cfbf1994b6b82a7de107fde5337aa485a.tar.gz
r12619@catbus: nickm | 2007-05-01 16:13:42 -0400
Add code to upload extrainfos to authorities running 0.2.0.0-alpha-dev (r10070) or later. svn:r10086
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index d00e6673a..2a4405d38 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3797,6 +3797,7 @@ routerstatus_list_update_from_networkstatus(time_t now)
int n_v2_dir=0, n_fast=0, n_stable=0, n_exit=0, n_guard=0, n_bad_exit=0;
int n_bad_directory=0;
int n_version_known=0, n_supports_begindir=0;
+ int n_supports_extrainfo_upload=0;
int n_desc_digests=0, highest_count=0;
const char *the_name = NULL;
local_routerstatus_t *rs_out, *rs_old;
@@ -3890,6 +3891,8 @@ routerstatus_list_update_from_networkstatus(time_t now)
++n_version_known;
if (rs->version_supports_begindir)
++n_supports_begindir;
+ if (rs->version_supports_extrainfo_upload)
+ ++n_supports_extrainfo_upload;
}
/* Go over the descriptor digests and figure out which descriptor we
* want. */
@@ -3945,6 +3948,8 @@ routerstatus_list_update_from_networkstatus(time_t now)
rs_out->status.version_known = n_version_known > 0;
rs_out->status.version_supports_begindir =
n_supports_begindir > n_version_known/2;
+ rs_out->status.version_supports_extrainfo_upload =
+ n_supports_extrainfo_upload > n_version_known/2;
if (!rs_old || memcmp(rs_old, rs_out, sizeof(local_routerstatus_t)))
smartlist_add(changed_list, rs_out);
}