From: Nick Mathewson Date: Thu, 8 Apr 2004 19:49:55 +0000 (+0000) Subject: note which preexisting or connection we found. X-Git-Tag: tor-0.0.6incompat-merged~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa2189b4066600492495ea3cd2f0983ed8188c3c;p=thirdparty%2Ftor.git note which preexisting or connection we found. svn:r1571 --- diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 1de668e639..5e122c8480 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; }