[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r17212: {tor} Aaaaand, do not reset the download count just because we hav (tor/trunk/src/or)
Author: nickm
Date: 2008-11-07 09:57:14 -0500 (Fri, 07 Nov 2008)
New Revision: 17212
Modified:
tor/trunk/src/or/routerlist.c
Log:
Aaaaand, do not reset the download count just because we have a certificate that is listed in a consensus.
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2008-11-07 14:17:46 UTC (rev 17211)
+++ tor/trunk/src/or/routerlist.c 2008-11-07 14:57:14 UTC (rev 17212)
@@ -111,6 +111,7 @@
cl = digestmap_get(trusted_dir_certs, id_digest);
if (!cl) {
cl = tor_malloc_zero(sizeof(cert_list_t));
+ cl->dl_status.schedule = DL_SCHED_CONSENSUS;
cl->certs = smartlist_create();
digestmap_set(trusted_dir_certs, id_digest, cl);
}
@@ -406,6 +407,7 @@
authority_certs_fetch_missing(networkstatus_t *status, time_t now)
{
digestmap_t *pending;
+ authority_cert_t *cert;
smartlist_t *missing_digests;
char *resource = NULL;
cert_list_t *cl;
@@ -428,8 +430,9 @@
!trusteddirserver_get_by_v3_auth_digest(voter->identity_digest))
continue; /* We are not a cache, and we don't know this authority.*/
cl = get_cert_list(voter->identity_digest);
- if (authority_cert_get_by_digests(voter->identity_digest,
- voter->signing_key_digest)) {
+ cert = authority_cert_get_by_digests(voter->identity_digest,
+ voter->signing_key_digest);
+ if (cert && now < cert->expires) {
download_status_reset(&cl->dl_status);
continue;
}