[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] non-buggy robustness, even
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
main.c
Log Message:
non-buggy robustness, even
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- main.c 24 Jun 2003 23:09:21 -0000 1.72
+++ main.c 24 Jun 2003 23:14:39 -0000 1.73
@@ -119,7 +119,7 @@
/* first check if it's there exactly */
conn = connection_exact_get_by_addr_port(addr,port);
- if(conn && connection_state_is_open(conn) && !conn->marked_for_close) {
+ if(conn && connection_state_is_open(conn)) {
log(LOG_INFO,"connection_twin_get_by_addr_port(): Found exact match.");
return conn;
}
@@ -133,7 +133,9 @@
for(i=0;i<nfds;i++) {
conn = connection_array[i];
assert(conn);
- if(connection_state_is_open(conn) && !crypto_pk_cmp_keys(conn->pkey, router->pkey)) {
+ if(connection_state_is_open(conn) &&
+ !conn->marked_for_close &&
+ !crypto_pk_cmp_keys(conn->pkey, router->pkey)) {
log(LOG_INFO,"connection_twin_get_by_addr_port(): Found twin (%s).",conn->address);
return conn;
}