aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-08 19:49:55 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-08 19:49:55 +0000
commitaa2189b4066600492495ea3cd2f0983ed8188c3c (patch)
tree4962552cebf2d0c21817c24421a431781035f1d7 /src/or/connection_or.c
parenteb9f5a561e73578e8171960d0d3f02bdba9b7b63 (diff)
downloadtor-aa2189b4066600492495ea3cd2f0983ed8188c3c.tar
tor-aa2189b4066600492495ea3cd2f0983ed8188c3c.tar.gz
note which preexisting or connection we found.
svn:r1571
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 1de668e63..5e122c848 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -181,6 +181,7 @@ static int connection_tls_finish_handshake(connection_t *conn) {
crypto_pk_env_t *pk;
routerinfo_t *router;
char nickname[MAX_NICKNAME_LEN+1];
+ connection_t *c;
conn->state = OR_CONN_STATE_OPEN;
directory_set_dirty();
@@ -224,8 +225,8 @@ 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);
+ if((c=connection_exact_get_by_addr_port(router->addr,router->or_port))) {
+ log_fn(LOG_INFO,"Router %s is already connected on fd %d. Dropping fd %d.", router->nickname, c->s, conn->s);
crypto_free_pk_env(pk);
return -1;
}