[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] revert part of that last change



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection_or.c 
Log Message:
revert part of that last change
time for bed


Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- connection_or.c	18 Nov 2003 10:17:52 -0000	1.76
+++ connection_or.c	18 Nov 2003 10:38:13 -0000	1.77
@@ -224,17 +224,17 @@
     }
     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);
   if (strcmp(conn->nickname, nickname)) {
     log_fn(LOG_WARN,"Other side claims to be '%s', but we wanted '%s'",
            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... */