diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/or/connection_edge.c | 5 | ||||
-rw-r--r-- | src/or/directory.c | 4 |
3 files changed, 13 insertions, 0 deletions
@@ -7,6 +7,10 @@ Changes in versino 0.1.2.20 - 2008-??-?? blocked_on_or_conn field set. This prevents a rare assertion error that could occur when an OR connection carrying tunneled directory requests closed before the requests were complete. Fixes bug 406. + - If we only ever used Tor for hidden service lookups or posts, we + would stop building circuits and start refusing connections after + 24 hours, since we falsely believed that Tor was dormant. Reported + by nwf. o Minor bugfixes: - Stop recommending that every server operator send mail to tor-ops. diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 644ed54b64..f513025cca 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1390,6 +1390,11 @@ connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn, connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL); return -1; } + + /* Help predict this next time. We're not sure if it will need + * a stable circuit yet, but we know we'll need *something*. */ + rep_hist_note_used_internal(now, 0, 1); + if (r==0) { conn->_base.state = AP_CONN_STATE_RENDDESC_WAIT; log_info(LD_REND, "Unknown descriptor %s. Fetching.", diff --git a/src/or/directory.c b/src/or/directory.c index 06eae5a89f..1b5c21042f 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -455,6 +455,10 @@ directory_initiate_command(const char *address, uint32_t addr, * populate it and add it at the right state * socketpair and hook up both sides */ + + if (private_connection) + rep_hist_note_used_port(time(NULL), conn->_base.port); + conn->dirconn_direct = 0; conn->_base.s = connection_ap_make_bridge(conn->_base.address, conn->_base.port, |