aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-25 06:43:53 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-25 06:43:53 +0000
commit6452aecedb2b0c498dcc7acddaca062c0b02bcc4 (patch)
treea4029e8326b75e06e2e74639c01b3ec034e8276b /src/or
parentb6b1b4f2838addea9cc9d650b6b1ee27ed42ea88 (diff)
downloadtor-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.c1
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) {