diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-03 18:33:07 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-03 18:33:07 +0000 |
commit | 451f8b50452ae44c4319cfe55c666a45b9994e9f (patch) | |
tree | d88f565d8f7f74253af9d2a721978737b157782a /src/or/connection.c | |
parent | 86ba00290b4e1f7095c1d34c46ac5b61273953be (diff) | |
download | tor-451f8b50452ae44c4319cfe55c666a45b9994e9f.tar.gz tor-451f8b50452ae44c4319cfe55c666a45b9994e9f.zip |
- Implement all of control interface except authentication, setconfig,
and actually making the sockets.
- Make sure that identity-based nicknames start with $.
- Use new string_join interface.
svn:r2661
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 79c5b997f6..7d3b4c43bc 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -198,12 +198,15 @@ 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) { - if(connection_or_nonopen_was_started_here(conn)) + if(connection_or_nonopen_was_started_here(conn)) { rep_hist_note_connect_failed(conn->identity_digest, time(NULL)); + control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED); + } } else if (0) { // XXX reason == CLOSE_REASON_UNUSED_OR_CONN) { rep_hist_note_disconnect(conn->identity_digest, time(NULL)); } else if(conn->identity_digest) { rep_hist_note_connection_died(conn->identity_digest, time(NULL)); + control_event_or_conn_status(conn, OR_CONN_EVENT_CLOSED); } break; case CONN_TYPE_AP: @@ -212,6 +215,8 @@ void connection_about_to_close_connection(connection_t *conn) connection_ap_handshake_socks_reply(conn, NULL, 0, 0); conn->socks_request->has_finished = 1; conn->hold_open_until_flushed = 1; + } else { + control_event_stream_status(conn, STREAM_EVENT_CLOSED); } break; case CONN_TYPE_EXIT: |