]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
note which preexisting or connection we found.
authorNick Mathewson <nickm@torproject.org>
Thu, 8 Apr 2004 19:49:55 +0000 (19:49 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 8 Apr 2004 19:49:55 +0000 (19:49 +0000)
svn:r1571

src/or/connection_or.c

index 1de668e639bb9c0b538cbf51f21273b63cd0e76b..5e122c8480cb2a3de70b64a2426fd3e594c7bf0c 100644 (file)
@@ -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;
     }