]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix yet another time comparison bug. we were abandoning helpers
authorRoger Dingledine <arma@torproject.org>
Sun, 11 Dec 2005 11:23:36 +0000 (11:23 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 11 Dec 2005 11:23:36 +0000 (11:23 +0000)
as soon as they became unavailable. (is this true?)

svn:r5565

src/or/circuitbuild.c

index 8ac40d99561003f03a51e82388ae589ece891b14..dc5a02d1ade9bd74c9db47a4ae37a2687009cd7f 100644 (file)
@@ -1751,10 +1751,12 @@ remove_dead_helpers(void)
     helper_node_t *helper = smartlist_get(helper_nodes, i);
     const char *why = NULL;
     time_t since = 0;
-    if (helper->unlisted_since + HELPER_ALLOW_UNLISTED > now) {
+    if (helper->unlisted_since &&
+        helper->unlisted_since + HELPER_ALLOW_UNLISTED < now) {
       why = "unlisted";
       since = helper->unlisted_since;
-    } else if (helper->down_since + HELPER_ALLOW_DOWNTIME > now) {
+    } else if (helper->down_since &&
+               helper->down_since + HELPER_ALLOW_DOWNTIME < now) {
       why = "down";
       since = helper->down_since;
     }