Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.

svn:r5470
This commit is contained in:
Nick Mathewson 2005-11-30 04:28:41 +00:00
parent 3bd613b44d
commit a6eb8cd2a0
2 changed files with 4 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}