diff options
author | Roger Dingledine <arma@torproject.org> | 2005-11-25 06:43:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-11-25 06:43:53 +0000 |
commit | 6452aecedb2b0c498dcc7acddaca062c0b02bcc4 (patch) | |
tree | a4029e8326b75e06e2e74639c01b3ec034e8276b /src/or | |
parent | b6b1b4f2838addea9cc9d650b6b1ee27ed42ea88 (diff) | |
download | tor-6452aecedb2b0c498dcc7acddaca062c0b02bcc4.tar tor-6452aecedb2b0c498dcc7acddaca062c0b02bcc4.tar.gz |
when calling connection_get_by_identity_digest, don't do a memcmp
for non-OR conns. this should save a bit of time.
svn:r5456
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 88cbd9a67..333df458e 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -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)) continue; if (!best) { |