[or-cvs] note which preexisting or connection we found.

Nick Mathewson nickm at seul.org
Thu Apr 8 19:49:58 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv16594/src/or

Modified Files:
	connection_or.c 
Log Message:
note which preexisting or connection we found.

Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- connection_or.c	7 Apr 2004 19:46:26 -0000	1.93
+++ connection_or.c	8 Apr 2004 19:49:55 -0000	1.94
@@ -181,6 +181,7 @@
   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 @@
     }
     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;
     }



More information about the tor-commits mailing list