summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-11-14 02:55:12 +0000
committerNick Mathewson <nickm@torproject.org>2007-11-14 02:55:12 +0000
commit75922ff41f5518e44ac8752a37922de855488915 (patch)
tree8a9eb7a3202a2368557cc4444edddc9fd4bfa535 /src/or/connection_or.c
parent6739ef40277b012f44e8209bb3c9e352cccc5cb1 (diff)
downloadtor-75922ff41f5518e44ac8752a37922de855488915.tar.gz
tor-75922ff41f5518e44ac8752a37922de855488915.zip
r16663@catbus: nickm | 2007-11-13 21:51:28 -0500
Back out parts of r12376: replace file locations in scripts. svn:r12490
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index fb29fa5870..4071c9cf8d 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -456,6 +456,9 @@ connection_or_get_by_identity_digest(const char *digest)
continue; /* avoid non-open conns if we can */
newer = best->_base.timestamp_created < conn->_base.timestamp_created;
+ if (best->is_canonical && !conn->is_canonical)
+ continue; /* A canonical connection is best. */
+
if (!best->_base.or_is_obsolete && conn->_base.or_is_obsolete)
continue; /* We never prefer obsolete over non-obsolete connections. */
@@ -763,7 +766,6 @@ connection_tls_finish_handshake(or_connection_t *conn)
directory_set_dirty();
if (tor_tls_used_v1_handshake(conn->tls)) {
-
conn->link_proto = 1;
if (connection_or_check_valid_tls_handshake(conn, started_here,
digest_rcvd) < 0)