summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-02-04 23:27:35 +0000
committerRoger Dingledine <arma@torproject.org>2009-02-04 23:27:35 +0000
commitdecdf4537ab9d2fc8301a01f7b7ce1b47b109f98 (patch)
treecc250ef7b1e3a01d49d0f072cca05691ba2b1064 /src/or/circuitbuild.c
parent8977f24eb8810d68c8fed09f5e81a0b0e0350a23 (diff)
downloadtor-decdf4537ab9d2fc8301a01f7b7ce1b47b109f98.tar.gz
tor-decdf4537ab9d2fc8301a01f7b7ce1b47b109f98.zip
If we're using bridges and our network goes away, be more willing
to forgive our bridges and try again when we get an application request. Bugfix on 0.2.0.x. svn:r18396
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 0aeb7686ae..12db9dd7c5 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2260,10 +2260,15 @@ entry_guards_compute_status(void)
* is established (<b>succeeded</b>==1) or has failed (<b>succeeded</b>==0).
* If the OR is an entry, change that entry's up/down status.
* Return 0 normally, or -1 if we want to tear down the new connection.
+ *
+ * If <b>mark_relay_status</b>, also call router_set_status() on this
+ * relay.
+ *
+ * XXX022 change succeeded and mark_relay_status into 'int flags'.
*/
int
entry_guard_register_connect_status(const char *digest, int succeeded,
- time_t now)
+ int mark_relay_status, time_t now)
{
int changed = 0;
int refuse_conn = 0;
@@ -2333,6 +2338,11 @@ entry_guard_register_connect_status(const char *digest, int succeeded,
}
}
+ /* if the caller asked us to, also update the is_running flags for this
+ * relay */
+ if (mark_relay_status)
+ router_set_status(digest, succeeded);
+
if (first_contact) {
/* We've just added a new long-term entry guard. Perhaps the network just
* came back? We should give our earlier entries another try too,
@@ -3139,6 +3149,7 @@ bridges_retry_helper(int act)
}
}
});
+ log_debug(LD_DIR, "any_known %d, any_running %d", any_known, any_running);
return any_known && !any_running;
}