aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-08-13 20:17:14 +0000
committerNick Mathewson <nickm@torproject.org>2007-08-13 20:17:14 +0000
commit94c90c42e3883b37f392951fa1867cf94c0930d7 (patch)
tree7a7322f9eacf4d33f5c4bf72bbe5cf768382644d /src
parent936edd901dd87cf563783c5130dd76decb3fdef3 (diff)
downloadtor-94c90c42e3883b37f392951fa1867cf94c0930d7.tar.gz
tor-94c90c42e3883b37f392951fa1867cf94c0930d7.zip
r13987@Kushana: nickm | 2007-08-13 16:17:09 -0400
Stop segfaulting on failed consensus. svn:r11090
Diffstat (limited to 'src')
-rw-r--r--src/or/dirvote.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index b7aa3872ca..dd8bc7aa08 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1276,7 +1276,10 @@ dirvote_compute_consensus(void)
votes, n_voters,
my_cert->identity_key,
get_my_v3_authority_signing_key());
-
+ if (!consensus_body) {
+ log_warn(LD_DIR, "Couldn't generate a consensus at all!");
+ goto err;
+ }
consensus = networkstatus_parse_vote_from_string(consensus_body, 0);
if (!consensus) {
log_warn(LD_DIR, "Couldn't parse consensus we generated!");