aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-20 04:59:29 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-20 04:59:29 +0000
commit2ba2f0218130731e46fed9cc565d0b802d4f4a31 (patch)
tree4f338697777b4fec4472150c2fbe34a0766c4d4a /src/or/connection_or.c
parent50354cbae73cfa50315eff581010fa27fa6451fd (diff)
downloadtor-2ba2f0218130731e46fed9cc565d0b802d4f4a31.tar
tor-2ba2f0218130731e46fed9cc565d0b802d4f4a31.tar.gz
Integrate the new "rephist" [rep(utation) hist(ory)] module to trace
successful/failed connections, successful/failed extends, and connection uptimes. It's still not done: more tests are needed, and not everything calls connection/circuit_mark_for_close properly. This skews the results. Also, there needs to be a 'testing' mode for non-OP ORs, where they periodically build circuits just to test whether extends work. svn:r1313
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9f0f3b85c..39f3f2755 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -112,6 +112,8 @@ connection_t *connection_or_connect(routerinfo_t *router) {
/* set up conn so it's got all the data we need to remember */
connection_or_init_conn_from_router(conn, router);
+ /* XXXX Should all this stuff do mark-for-close instead? */
+
if(connection_add(conn) < 0) { /* no space, forget it */
connection_free(conn);
return NULL;
@@ -242,7 +244,12 @@ static int connection_tls_finish_handshake(connection_t *conn) {
if (!options.ORPort) { /* If I'm an OP... */
conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP;
circuit_n_conn_open(conn); /* send the pending creates, if any. */
+ /* XXXX ORs may need to send creates for test circuits; "I am an OR"
+ * doesn't mean "I have no pending creates", right?
+ */
}
+ /* Note the success */
+ rep_hist_note_connect_succeeded(nickname, time(NULL));
return 0;
}