aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-11-30 04:28:41 +0000
committerNick Mathewson <nickm@torproject.org>2005-11-30 04:28:41 +0000
commita6eb8cd2a0a206c7cc975751044723e4bcc60b7b (patch)
tree71b5569a8a1bdf1584e7fc7e2d9a07d6cb9d10ff /src
parent3bd613b44d955f9c8585ce26400b921038d26773 (diff)
downloadtor-a6eb8cd2a0a206c7cc975751044723e4bcc60b7b.tar
tor-a6eb8cd2a0a206c7cc975751044723e4bcc60b7b.tar.gz
Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.
svn:r5470
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c1
-rw-r--r--src/or/main.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index a9dcd4593..176608090 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -238,6 +238,7 @@ _connection_free(connection_t *conn)
}
if (conn->type == CONN_TYPE_OR && !tor_digest_is_zero(conn->identity_digest)) {
+ warn(LD_BUG, "called on OR conn with non-zeroed idenity_digest");
connection_or_remove_from_identity_map(conn);
}
diff --git a/src/or/main.c b/src/or/main.c
index 42e92d92f..d1be68ca3 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -198,6 +198,9 @@ connection_unlink(connection_t *conn, int remove)
if (conn->type == CONN_TYPE_EXIT) {
assert_connection_edge_not_dns_pending(conn);
}
+ if (conn->type == CONN_TYPE_OR && !tor_digest_is_zero(conn->identity_digest)) {
+ connection_or_remove_from_identity_map(conn);
+ }
connection_free(conn);
}