]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r13985@Kushana: nickm | 2007-08-13 16:05:07 -0400
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Aug 2007 20:05:25 +0000 (20:05 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Aug 2007 20:05:25 +0000 (20:05 +0000)
 Fix some simple logic errors in voting.

svn:r11089

src/or/dirserv.c
src/or/dirvote.c

index e481723f2ea94c3d3102264f13d725d8b970dff4..0646c6fb996dcd6fcd074cb873f97361863b317f 100644 (file)
@@ -2221,7 +2221,6 @@ generate_v3_networkstatus(void)
       cached_dir_decref(*ns_ptr);
     *ns_ptr = new_cached_dir(status, now);
     status = NULL; /* So it doesn't get double-freed. */
-    router_set_networkstatus((*ns_ptr)->dir, now, NS_GENERATED, NULL);
   }
 
   return the_v3_networkstatus_vote;
index e9b991d39e678a1b42d20fefae625b90ff315e21..b7aa3872cac90efbad00fbdba286a332538f0c18 100644 (file)
@@ -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;