Commit 6452aece authored by Roger Dingledine's avatar Roger Dingledine
Browse files

when calling connection_get_by_identity_digest, don't do a memcmp

for non-OR conns. this should save a bit of time.

parent b6b1b4f2
......@@ -1590,6 +1590,7 @@ connection_get_by_identity_digest(const char *digest)
for (i=0;i<n;i++) {
conn = carray[i];
if (conn->marked_for_close ||
conn->type != CONN_TYPE_OR ||
memcmp(conn->identity_digest, digest, DIGEST_LEN))
if (!best) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment