diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-11 11:04:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-11 11:04:47 -0400 |
commit | cce06b649edc51c67bba00c23d0b2b27ad2b892f (patch) | |
tree | ccce2a9a4d85da3bbd895c1e3ce2b30cccb44520 /src/or/control.c | |
parent | b8ceb464e5949b07ba9bd007002a49f3ab9c600b (diff) | |
parent | 1c475eb018989f090c1423c25dc2f09380b10693 (diff) | |
download | tor-cce06b649edc51c67bba00c23d0b2b27ad2b892f.tar.gz tor-cce06b649edc51c67bba00c23d0b2b27ad2b892f.zip |
Merge remote-tracking branch 'asn/bug11069_take2'
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/control.c b/src/or/control.c index 1da9969928..23e2054f9e 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -4879,10 +4879,12 @@ control_event_bootstrap(bootstrap_status_t status, int progress) /** Called when Tor has failed to make bootstrapping progress in a way * that indicates a problem. <b>warn</b> gives a hint as to why, and - * <b>reason</b> provides an "or_conn_end_reason" tag. + * <b>reason</b> provides an "or_conn_end_reason" tag. <b>or_conn</b> + * is the connection that caused this problem. */ MOCK_IMPL(void, -control_event_bootstrap_problem, (const char *warn, int reason)) + control_event_bootstrap_problem, (const char *warn, int reason, + const or_connection_t *or_conn)) { int status = bootstrap_percent; const char *tag, *summary; @@ -4904,9 +4906,10 @@ control_event_bootstrap_problem, (const char *warn, int reason)) if (reason == END_OR_CONN_REASON_NO_ROUTE) recommendation = "warn"; - if (get_options()->UseBridges && - !any_bridge_descriptors_known() && - !any_pending_bridge_descriptor_fetches()) + /* If we are using bridges and all our OR connections are now + closed, it means that we totally failed to connect to our + bridges. Throw a warning. */ + if (get_options()->UseBridges && !any_other_active_or_conns(or_conn)) recommendation = "warn"; if (we_are_hibernating()) |