summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-10-06 23:37:07 +0000
committerRoger Dingledine <arma@torproject.org>2006-10-06 23:37:07 +0000
commit1cf37f90c4da02335109dad3cd4bb3fcdce81f24 (patch)
tree80e0a99b3e1b48d01ebce2ac02fe697b7a2eab83 /src/or/connection_or.c
parent864069f5c754f291c1c4ce63a7f9dc2bc31d4afe (diff)
downloadtor-1cf37f90c4da02335109dad3cd4bb3fcdce81f24.tar.gz
tor-1cf37f90c4da02335109dad3cd4bb3fcdce81f24.zip
bugfix and cleanups re: entry guards.
svn:r8620
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 7268576182..e8681d9a50 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -448,7 +448,8 @@ 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_register_connect_status(conn->identity_digest, 0);
+ entry_guard_register_connect_status(conn->identity_digest, 0,
+ time(NULL));
router_set_status(conn->identity_digest, 0);
}
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED);
@@ -622,7 +623,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_register_connect_status(conn->identity_digest, 0);
+ entry_guard_register_connect_status(conn->identity_digest, 0, time(NULL));
router_set_status(conn->identity_digest, 0);
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED);
as_advertised = 0;
@@ -684,7 +685,8 @@ 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_register_connect_status(conn->identity_digest, 1) < 0) {
+ if (entry_guard_register_connect_status(conn->identity_digest, 1,
+ time(NULL)) < 0) {
/* pending circs get closed in circuit_about_to_close_connection() */
return -1;
}