diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-03-20 04:59:29 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-03-20 04:59:29 +0000 |
commit | 2ba2f0218130731e46fed9cc565d0b802d4f4a31 (patch) | |
tree | 4f338697777b4fec4472150c2fbe34a0766c4d4a /src/or/connection.c | |
parent | 50354cbae73cfa50315eff581010fa27fa6451fd (diff) | |
download | tor-2ba2f0218130731e46fed9cc565d0b802d4f4a31.tar.gz tor-2ba2f0218130731e46fed9cc565d0b802d4f4a31.zip |
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.c')
-rw-r--r-- | src/or/connection.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 50903cf362..c5e205ddfb 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -185,7 +185,15 @@ _connection_mark_for_close(connection_t *conn, char reason) /* No special processing needed. */ break; case CONN_TYPE_OR: - /* No special processing needed, I think. */ + /* Remember why we're closing this connection. */ + if (conn->state != OR_CONN_STATE_OPEN) { + rep_hist_note_connect_failed(conn->nickname, time(NULL)); + } else if (reason == CLOSE_REASON_UNUSED_OR_CONN) { + rep_hist_note_disconnect(conn->nickname, time(NULL)); + } else { + rep_hist_note_connection_died(conn->nickname, time(NULL)); + } + /* No special processing needed. */ break; case CONN_TYPE_EXIT: case CONN_TYPE_AP: |