diff options
author | Roger Dingledine <arma@torproject.org> | 2003-11-18 10:38:13 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-11-18 10:38:13 +0000 |
commit | a6595f4579d5d67eff58f735d5fae1af235d4a6e (patch) | |
tree | ec16bc143acc1e8e8f733e6550585eb6ceeb75a6 /src | |
parent | c00953d2a119b372c46fee27a9655ea00dabb577 (diff) | |
download | tor-a6595f4579d5d67eff58f735d5fae1af235d4a6e.tar tor-a6595f4579d5d67eff58f735d5fae1af235d4a6e.tar.gz |
revert part of that last change
time for bed
svn:r840
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_or.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index ecbd7eb70..0c3d932a1 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -224,6 +224,11 @@ static int connection_tls_finish_handshake(connection_t *conn) { } log_fn(LOG_DEBUG,"The router's pk matches the one we meant to connect to. Good."); } else { + if(connection_exact_get_by_addr_port(router->addr,router->or_port)) { + log_fn(LOG_INFO,"Router %s is already connected. Dropping.", router->nickname); + crypto_free_pk_env(pk); + return -1; + } connection_or_init_conn_from_router(conn, router); } crypto_free_pk_env(pk); @@ -232,11 +237,6 @@ static int connection_tls_finish_handshake(connection_t *conn) { nickname, conn->nickname); return -1; } - otherconn = connection_exact_get_by_addr_port(router->addr,router->or_port); - if(otherconn && connection_state_is_open(otherconn)) { - log_fn(LOG_INFO,"Router %s is already connected. Dropping.", router->nickname); - return -1; - } if (!options.OnionRouter) { /* If I'm an OP... */ conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP; circuit_n_conn_open(conn); /* send the pending creates, if any. */ |