]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Send an initial "Starting" bootstrap status event, so we have a
authorRoger Dingledine <arma@torproject.org>
Tue, 17 Jun 2008 08:15:42 +0000 (08:15 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 17 Jun 2008 08:15:42 +0000 (08:15 +0000)
state to start out in.

svn:r15326

ChangeLog
doc/spec/proposals/137-bootstrap-phases.txt
src/or/main.c
src/or/or.h

index 6f623e6cad61d807fab138a84d1794868f637c19..a6586b66a48a3ebc86dbf5adf2a9defdc2520716 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,11 @@ Changes in version 0.2.1.2-alpha - 2008-??-??
       proposal 138.
     - In directory authorities' approved-routers files, allow
       fingerprints with or without space.
+    - Add a "GETINFO /status/bootstrap-phase" controller option, so the
+      controller can query our current bootstrap state in case it attaches
+      partway through and wants to catch up.
+    - Send an initial "Starting" bootstrap status event, so we have a
+      state to start out in.
 
   o Bugfixes:
     - Asking for a conditional consensus at .../consensus/<fingerprints>
index fa7614b7e0ebf0dacf1e5a63405e6482db858e8d..4be2cd856eba00db94798e98bbbaebbe99edb74d 100644 (file)
@@ -55,11 +55,10 @@ Status: Open
   the same order. Some phases might also be skipped (not reported) if the
   associated bootstrap step is already complete.
 
-  Phase 0:
+  Phase 1:
   tag=starting summary="starting"
 
-  Tor starts out in this phase. It doesn't actually send a status event
-  to say so.
+  Tor starts out in this phase.
 
   Phase 5:
   tag=conn_dir summary="Connecting to directory mirror"
index 55ab39cca64e3a811c57b609027c3d774acdf96f..f2457c42059acb2cdfb3f694bff2311e9aa3fb1a 100644 (file)
@@ -1407,6 +1407,9 @@ do_main_loop(void)
   stats_prev_global_read_bucket = global_read_bucket;
   stats_prev_global_write_bucket = global_write_bucket;
 
+  /* initialize the bootstrap status events to know we're starting up */
+  control_event_bootstrap(BOOTSTRAP_STATUS_STARTING, 0);
+
   if (trusted_dirs_reload_certs())
     return -1;
   if (router_reload_v2_networkstatus()) {
index b7d6e1371f4ab6795984c236332b970fb69b671c..ca3c4cd3712f4f880ad04f9276054ae2f1ab4700 100644 (file)
@@ -3054,7 +3054,7 @@ void enable_control_logging(void);
 /** Enum describing various stages of bootstrapping, for use with controller
  * bootstrap status events. The values range from 0 to 100. */
 typedef enum {
-  BOOTSTRAP_STATUS_STARTING=0,
+  BOOTSTRAP_STATUS_STARTING=1,
   BOOTSTRAP_STATUS_CONN_DIR=5,
   BOOTSTRAP_STATUS_HANDSHAKE=-1,
   BOOTSTRAP_STATUS_HANDSHAKE_DIR=10,