aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjuga0 <juga@riseup.net>2018-05-31 08:07:22 +0000
committerjuga0 <juga@riseup.net>2018-07-16 14:43:49 +0000
commit086060e138d0fe5904a8b09d48bdcf9d8922af39 (patch)
tree9fb1c3b49e24c6c7ffd8c61379f5669019947097 /src
parente5dd46beabb7f456fcf4456271676bc507886fe5 (diff)
downloadtor-086060e138d0fe5904a8b09d48bdcf9d8922af39.tar.gz
tor-086060e138d0fe5904a8b09d48bdcf9d8922af39.zip
Do not add bw file line to the vote
when there are not bw file headers lines.
Diffstat (limited to 'src')
-rw-r--r--src/feature/dirauth/dirvote.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 27d3a4841b..a1bafb4fd4 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -254,8 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
/* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/
char *flag_thresholds = dirserv_get_flag_thresholds_line();
char *params;
- char *bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers,
- " ", 0, NULL);
+ char *bwlist_headers;
authority_cert_t *cert = v3_ns->cert;
char *methods =
make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD,
@@ -270,6 +269,11 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
else
params = tor_strdup("");
tor_assert(cert);
+ if (v3_ns->bwlist_headers)
+ bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, " ", 0,
+ NULL);
+ else
+ bwlist_headers = tor_strdup("");
smartlist_add_asprintf(chunks,
"network-status-version 3\n"
"vote-status %s\n"