]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a new status event for consensus arrival
authorNick Mathewson <nickm@torproject.org>
Tue, 9 Dec 2008 18:16:41 +0000 (18:16 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 9 Dec 2008 18:16:41 +0000 (18:16 +0000)
svn:r17535

ChangeLog
src/or/networkstatus.c

index f8d08c62aeef6bd976f15231658cfd579b40beed..63238d534b26c2c290857413bbd78caba103fbc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Changes in version 0.2.1.9-alpha - 200?-??-??
+
+  o Minor features (controller):
+    - New CONSENSUS_ARRIVED event 
+
 Changes in version 0.2.1.8-alpha - 2008-12-08
   o Major features:
     - New DirPortFrontPage option that takes an html file and publishes
index b1cd2eeab8f64b86342d130d6a094b5f42818f0e..8ed66f068fe2c9aa9a9f768eacca560d0a9f504f 100644 (file)
@@ -1359,6 +1359,11 @@ networkstatus_copy_old_consensus_info(networkstatus_t *new_c,
  * <b>consensus</b>.  If we don't have enough certificates to validate it,
  * store it in consensus_waiting_for_certs and launch a certificate fetch.
  *
+ * If flags & NSSET_FROM_CACHE, this networkstatus has come from the disk
+ * cache.  If flags & NSSET_WAS_WAITING_FOR_CERTS, this networkstatus was
+ * already received, but we were waiting for certificates on it.  If flags &
+ * NSSET_DONT_DOWNLOAD_CERTS, do not launch certificate downloads as needed.
+ *
  * Return 0 on success, <0 on failure.  On failure, caller should increment
  * the failure count as appropriate.
  *
@@ -1448,6 +1453,9 @@ networkstatus_set_current_consensus(const char *consensus, unsigned flags)
     }
   }
 
+  if (!from_cache)
+    control_event_client_status(LOG_NOTICE, "CONSENSUS_ARRIVED");
+
   /* Are we missing any certificates at all? */
   if (r != 1 && dl_certs)
     authority_certs_fetch_missing(c, now);