diff options
author | Peter Palfrader <peter@palfrader.org> | 2008-08-17 08:01:23 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2008-08-17 08:01:23 +0000 |
commit | 3c0b0ccca9d035c1ffbae94949edf76333310bd4 (patch) | |
tree | 7afdb561cf0eb68197cb5bc40b08403940841704 /src/or/dirvote.c | |
parent | 4eecd27b42c3d5384f81450f8a0cd9c3ef7af272 (diff) | |
download | tor-3c0b0ccca9d035c1ffbae94949edf76333310bd4.tar.gz tor-3c0b0ccca9d035c1ffbae94949edf76333310bd4.zip |
Two consensus fixes: always reset has_* to 0, and use a buffer of proper length for exitsummaries.
svn:r16575
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 52336988fb..661ebc1813 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -878,6 +878,8 @@ networkstatus_compute_consensus(smartlist_t *votes, rs_out.published_on = rs->status.published_on; rs_out.dir_port = rs->status.dir_port; rs_out.or_port = rs->status.or_port; + rs_out.has_bandwidth = 0; + rs_out.has_exitsummary = 0; if (chosen_name && !naming_conflict) { strlcpy(rs_out.nickname, chosen_name, sizeof(rs_out.nickname)); @@ -1046,6 +1048,7 @@ networkstatus_compute_consensus(smartlist_t *votes, }; /* Now the exitpolicy summary line. */ if (rs_out.has_exitsummary) { + char buf[MAX_POLICY_LINE_LEN+1]; int r = tor_snprintf(buf, sizeof(buf), "p %s\n", rs_out.exitsummary); if (r<0) { log_warn(LD_BUG, "Not enough space in buffer for exitpolicy line."); |