[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] when calling connection_get_by_identity_digest, don"t do a ...
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
connection.c
Log Message:
when calling connection_get_by_identity_digest, don't do a memcmp
for non-OR conns. this should save a bit of time.
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.419
retrieving revision 1.420
diff -u -d -r1.419 -r1.420
--- connection.c 19 Nov 2005 06:57:44 -0000 1.419
+++ connection.c 25 Nov 2005 06:43:53 -0000 1.420
@@ -1590,6 +1590,7 @@
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) {