[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r12106: Reattempt certificate downloads immediately on failure, as a (in tor/trunk: . doc src/or)



Author: nickm
Date: 2007-10-22 13:31:22 -0400 (Mon, 22 Oct 2007)
New Revision: 12106

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/directory.c
   tor/trunk/src/or/networkstatus.c
   tor/trunk/src/or/or.h
Log:
 r16041@catbus:  nickm | 2007-10-22 13:02:14 -0400
 Reattempt certificate downloads immediately on failure, as appropriate.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r16041] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-10-22 16:32:10 UTC (rev 12105)
+++ tor/trunk/ChangeLog	2007-10-22 17:31:22 UTC (rev 12106)
@@ -33,6 +33,7 @@
     - Allow certificates to include an address.
     - When we change our directory-cache settings, reschedule all voting
       and download operations.
+    - Reattempt certificate downloads immediately on failure, as appropriate.
 
   o Minor features (router descriptor cache):
     - If we find a cached-routers file that's been sitting around for more

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-10-22 16:32:10 UTC (rev 12105)
+++ tor/trunk/doc/TODO	2007-10-22 17:31:22 UTC (rev 12106)
@@ -49,7 +49,7 @@
         of their first test, and then never seeing use.
 
   - Before 0.2.0.9-alpha (for nickm)
-    - Retry cert downloads as appropriate
+    o Retry cert downloads as appropriate
     - Delay consensus download retry when there's a unverified consensus we're
       downloading the certs to check
       - But don't delay forever.

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2007-10-22 16:32:10 UTC (rev 12105)
+++ tor/trunk/src/or/directory.c	2007-10-22 17:31:22 UTC (rev 12106)
@@ -592,6 +592,8 @@
     tor_free(cp);
   });
   smartlist_free(failed);
+
+  update_certificate_downloads(time(NULL));
 }
 
 /** Helper for directory_initiate_command_(router|trusted_dir): send the

Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-10-22 16:32:10 UTC (rev 12105)
+++ tor/trunk/src/or/networkstatus.c	2007-10-22 17:31:22 UTC (rev 12106)
@@ -843,6 +843,13 @@
   if (dirserver_mode(options))
     update_v2_networkstatus_cache_downloads(now);
   update_consensus_networkstatus_downloads(now);
+  update_certificate_downloads(now);
+}
+
+/**DOCDOC */
+void
+update_certificate_downloads(time_t now)
+{
   if (consensus_waiting_for_certs)
     authority_certs_fetch_missing(consensus_waiting_for_certs, now);
   else

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2007-10-22 16:32:10 UTC (rev 12105)
+++ tor/trunk/src/or/or.h	2007-10-22 17:31:22 UTC (rev 12106)
@@ -3106,6 +3106,7 @@
 void update_consensus_networkstatus_fetch_time(time_t now);
 int should_delay_dir_fetches(or_options_t *options);
 void update_networkstatus_downloads(time_t now);
+void update_certificate_downloads(time_t now);
 networkstatus_v2_t *networkstatus_v2_get_by_digest(const char *digest);
 networkstatus_vote_t *networkstatus_get_latest_consensus(void);
 networkstatus_vote_t *networkstatus_get_live_consensus(time_t now);