summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-08-13 20:05:25 +0000
committerNick Mathewson <nickm@torproject.org>2007-08-13 20:05:25 +0000
commit936edd901dd87cf563783c5130dd76decb3fdef3 (patch)
tree7903048874e1a37d53e347cbbe89393052919a39 /src/or/dirvote.c
parent2d07cce67f0a482cad2dc099510963f3f0c9bcf5 (diff)
downloadtor-936edd901dd87cf563783c5130dd76decb3fdef3.tar.gz
tor-936edd901dd87cf563783c5130dd76decb3fdef3.zip
r13985@Kushana: nickm | 2007-08-13 16:05:07 -0400
Fix some simple logic errors in voting. svn:r11089
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index e9b991d39e..b7aa3872ca 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1064,7 +1064,8 @@ dirvote_recalculate_timing(time_t now)
dist_delay = consensus->dist_seconds;
} else {
/* XXXX020 is this correct according the the spec? */
- interval = 3600;
+ /* XXXX020 drop this back down to 60 minutes, or whatever the spec says. */
+ interval = 1200;
vote_delay = dist_delay = 300;
}
@@ -1132,7 +1133,10 @@ dirvote_perform_vote(void)
pending_vote_t *pending_vote;
const char *msg = "";
- if ((pending_vote = dirvote_add_vote(new_vote->dir, &msg))) {
+ if (!new_vote)
+ return;
+
+ if (!(pending_vote = dirvote_add_vote(new_vote->dir, &msg))) {
log_warn(LD_DIR, "Couldn't store my own vote! (I told myself, '%s'.)",
msg);
return;