Send an initial "Starting" bootstrap status event, so we have a

state to start out in.


svn:r15326
This commit is contained in:
Roger Dingledine 2008-06-17 08:15:42 +00:00
parent c19392469d
commit 1ad83d74b1
4 changed files with 11 additions and 4 deletions

View File

@ -11,6 +11,11 @@ Changes in version 0.2.1.2-alpha - 2008-??-??
proposal 138. proposal 138.
- In directory authorities' approved-routers files, allow - In directory authorities' approved-routers files, allow
fingerprints with or without space. 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: o Bugfixes:
- Asking for a conditional consensus at .../consensus/<fingerprints> - Asking for a conditional consensus at .../consensus/<fingerprints>

View File

@ -55,11 +55,10 @@ Status: Open
the same order. Some phases might also be skipped (not reported) if the the same order. Some phases might also be skipped (not reported) if the
associated bootstrap step is already complete. associated bootstrap step is already complete.
Phase 0: Phase 1:
tag=starting summary="starting" tag=starting summary="starting"
Tor starts out in this phase. It doesn't actually send a status event Tor starts out in this phase.
to say so.
Phase 5: Phase 5:
tag=conn_dir summary="Connecting to directory mirror" tag=conn_dir summary="Connecting to directory mirror"

View File

@ -1407,6 +1407,9 @@ do_main_loop(void)
stats_prev_global_read_bucket = global_read_bucket; stats_prev_global_read_bucket = global_read_bucket;
stats_prev_global_write_bucket = global_write_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()) if (trusted_dirs_reload_certs())
return -1; return -1;
if (router_reload_v2_networkstatus()) { if (router_reload_v2_networkstatus()) {

View File

@ -3054,7 +3054,7 @@ void enable_control_logging(void);
/** Enum describing various stages of bootstrapping, for use with controller /** Enum describing various stages of bootstrapping, for use with controller
* bootstrap status events. The values range from 0 to 100. */ * bootstrap status events. The values range from 0 to 100. */
typedef enum { typedef enum {
BOOTSTRAP_STATUS_STARTING=0, BOOTSTRAP_STATUS_STARTING=1,
BOOTSTRAP_STATUS_CONN_DIR=5, BOOTSTRAP_STATUS_CONN_DIR=5,
BOOTSTRAP_STATUS_HANDSHAKE=-1, BOOTSTRAP_STATUS_HANDSHAKE=-1,
BOOTSTRAP_STATUS_HANDSHAKE_DIR=10, BOOTSTRAP_STATUS_HANDSHAKE_DIR=10,