diff options
author | Roger Dingledine <arma@torproject.org> | 2008-06-17 08:15:42 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-06-17 08:15:42 +0000 |
commit | 1ad83d74b1a52828eefb7b871644d5550fd7c531 (patch) | |
tree | 956f511fe1935df3f257bd915c56dfd5da1b574e | |
parent | c19392469de2431974da5d5fc87f919772cc3b4c (diff) | |
download | tor-1ad83d74b1a52828eefb7b871644d5550fd7c531.tar.gz tor-1ad83d74b1a52828eefb7b871644d5550fd7c531.zip |
Send an initial "Starting" bootstrap status event, so we have a
state to start out in.
svn:r15326
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/spec/proposals/137-bootstrap-phases.txt | 5 | ||||
-rw-r--r-- | src/or/main.c | 3 | ||||
-rw-r--r-- | src/or/or.h | 2 |
4 files changed, 11 insertions, 4 deletions
@@ -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> diff --git a/doc/spec/proposals/137-bootstrap-phases.txt b/doc/spec/proposals/137-bootstrap-phases.txt index fa7614b7e0..4be2cd856e 100644 --- a/doc/spec/proposals/137-bootstrap-phases.txt +++ b/doc/spec/proposals/137-bootstrap-phases.txt @@ -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" diff --git a/src/or/main.c b/src/or/main.c index 55ab39cca6..f2457c4205 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -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()) { diff --git a/src/or/or.h b/src/or/or.h index b7d6e1371f..ca3c4cd371 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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, |