[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] note bug in assert_connection_ok
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection.c onion.c
Log Message:
note bug in assert_connection_ok
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- connection.c 28 Feb 2004 07:01:22 -0000 1.160
+++ connection.c 28 Feb 2004 07:48:28 -0000 1.161
@@ -840,9 +840,13 @@
assert(!conn->tls);
} else {
if(conn->state == OR_CONN_STATE_OPEN) {
- assert(conn->bandwidth > 0);
+ /* assert(conn->bandwidth > 0); */
+ /* the above isn't necessarily true: if we just did a TLS
+ * handshake but we didn't recognize the other peer, or it
+ * gave a bad cert/etc, then we won't have assigned bandwidth,
+ * yet it will be open. -RD
+ */
assert(conn->receiver_bucket >= 0);
-// assert(conn->receiver_bucket <= 10*conn->bandwidth);
}
assert(conn->addr && conn->port);
assert(conn->address);
Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- onion.c 28 Feb 2004 05:09:37 -0000 1.126
+++ onion.c 28 Feb 2004 07:48:28 -0000 1.127
@@ -334,7 +334,7 @@
smartlist_free(sl);
tor_free(n_supported);
if(router) {
- log_fn(LOG_WARN, "Chose exit server '%s'", router->nickname);
+ log_fn(LOG_INFO, "Chose exit server '%s'", router->nickname);
return router;
}
log_fn(LOG_WARN, "No exit routers seem to be running; can't choose an exit.");