diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-12-05 19:15:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-12-05 19:15:27 +0000 |
commit | b03e8733f35b8a61cb0c7d5c68b5532db2b796a8 (patch) | |
tree | 9c0796b75f900d74fae9e87e55a23ff3b9c141f2 /src/or/connection.c | |
parent | f0abb1a74b3946930a4a0df2dfb314bd44e64151 (diff) | |
download | tor-b03e8733f35b8a61cb0c7d5c68b5532db2b796a8.tar.gz tor-b03e8733f35b8a61cb0c7d5c68b5532db2b796a8.zip |
Change how OR conns get removed from the identity map; fix some warnings on shutdown.
svn:r5509
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 1766080904..9531583413 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -257,6 +257,9 @@ connection_free(connection_t *conn) if (connection_speaks_cells(conn)) { if (conn->state == OR_CONN_STATE_OPEN) directory_set_dirty(); + if (!tor_digest_is_zero(conn->identity_digest)) { + connection_or_remove_from_identity_map(conn); + } } if (conn->type == CONN_TYPE_CONTROL) { conn->event_mask = 0; @@ -288,6 +291,9 @@ connection_free_all(void) carray[i]->event_mask = 0; control_update_global_event_mask(); + /* Unlink everything from the identity map. */ + connection_or_clear_identity_map(); + for (i=0;i<n;i++) _connection_free(carray[i]); |