summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-28 23:57:44 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-28 23:57:44 +0000
commit9988112c87bc5e4ad39880ffd2aa898e0e62e82f (patch)
tree972e8537767d5351cfcab636756a55293fd5ec86 /src/or/connection_or.c
parentbc25e87754814e1bdfa01336f0375f208e9a77fc (diff)
downloadtor-9988112c87bc5e4ad39880ffd2aa898e0e62e82f.tar.gz
tor-9988112c87bc5e4ad39880ffd2aa898e0e62e82f.zip
r8973@Kushana: nickm | 2006-09-28 16:53:19 -0400
Refactor entry guard status logic a lot; allow more factors [like not having a Guard flag or being listed in ExcludeNodes] to render a guard "unlisted" (now called "unusable"); track guard down status (now called "unreachable") separately from is_running. svn:r8519
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 76c2abbf13..7268576182 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -448,7 +448,7 @@ connection_or_connect(uint32_t addr, uint16_t port, const char *id_digest)
* an https proxy, our https proxy is down. Don't blame the
* Tor server. */
if (!options->HttpsProxy) {
- entry_guard_set_status(conn->identity_digest, 0);
+ entry_guard_register_connect_status(conn->identity_digest, 0);
router_set_status(conn->identity_digest, 0);
}
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED);
@@ -622,7 +622,7 @@ connection_or_check_valid_handshake(or_connection_t *conn, char *digest_rcvd)
"Identity key not as expected for router at %s:%d: wanted %s "
"but got %s",
conn->_base.address, conn->_base.port, expected, seen);
- entry_guard_set_status(conn->identity_digest, 0);
+ entry_guard_register_connect_status(conn->identity_digest, 0);
router_set_status(conn->identity_digest, 0);
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED);
as_advertised = 0;
@@ -684,7 +684,7 @@ connection_tls_finish_handshake(or_connection_t *conn)
control_event_or_conn_status(conn, OR_CONN_EVENT_CONNECTED);
if (started_here) {
rep_hist_note_connect_succeeded(conn->identity_digest, time(NULL));
- if (entry_guard_set_status(conn->identity_digest, 1) < 0) {
+ if (entry_guard_register_connect_status(conn->identity_digest, 1) < 0) {
/* pending circs get closed in circuit_about_to_close_connection() */
return -1;
}