diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-13 20:05:57 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-13 20:05:57 +0000 |
commit | e0cce8fba8dcefa8745a4ba768f911c09d9d7573 (patch) | |
tree | 289c0e8cd459725788e1234bae539b69b9a9ce28 /src/or/connection.c | |
parent | 30dd1c87a5ac1ebe7756bb48f7c94cb7f20de1da (diff) | |
download | tor-e0cce8fba8dcefa8745a4ba768f911c09d9d7573.tar tor-e0cce8fba8dcefa8745a4ba768f911c09d9d7573.tar.gz |
Unify tests for "did I originate this nonopen OR connection?"
svn:r2468
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 5f5313788..53ab7b083 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -192,13 +192,7 @@ void connection_about_to_close_connection(connection_t *conn) case CONN_TYPE_OR: /* Remember why we're closing this connection. */ if (conn->state != OR_CONN_STATE_OPEN) { - /* XXX Nick: this still isn't right, because it might be - * dying even though we didn't initiate the connect. Can - * you look at this more? -RD XXXX008 -NM*/ - /* XXX We only set conn->nickname when we initiate the connection, or - * when the handshake is complete; so conn->nickname is a good test - * for "we initiated the connection", right? -NM */ - if(conn->nickname) + if(connection_or_nonopen_was_started_here(conn)) rep_hist_note_connect_failed(conn->identity_digest, time(NULL)); } else if (0) { // XXX reason == CLOSE_REASON_UNUSED_OR_CONN) { rep_hist_note_disconnect(conn->identity_digest, time(NULL)); |