aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-09-02 16:42:18 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-02 16:46:03 -0400
commitbfa1962d8026e632e00760c1e14b39d154977adf (patch)
tree218e96b860a5fa4fa1baae7e1e316309e6c7502f /src/or/directory.c
parent6f9f1f3324d49ffbe0a5275a268111882ba8851f (diff)
downloadtor-bfa1962d8026e632e00760c1e14b39d154977adf.tar.gz
tor-bfa1962d8026e632e00760c1e14b39d154977adf.zip
Complicate the rules on WARN vs INFO in consensus verification
It's normal when bootstrapping to have a lot of different certs missing, so we don't want missing certs to make us warn... unless the certs we're missing are ones that we've tried to fetch a couple of times and failed at. May fix bug 1145.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index a3e575ac97..e46d08a7a5 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -3484,6 +3484,14 @@ download_status_reset(download_status_t *dls)
dls->next_attempt_at = time(NULL) + schedule[0];
}
+/** Return the number of failures on <b>dls</b> since the last success (if
+ * any). */
+int
+download_status_get_n_failures(const download_status_t *dls)
+{
+ return dls->n_download_failures;
+}
+
/** Called when one or more routerdesc (or extrainfo, if <b>was_extrainfo</b>)
* fetches have failed (with uppercase fingerprints listed in <b>failed</b>,
* either as descriptor digests or as identity digests based on