aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-28 07:48:28 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-28 07:48:28 +0000
commit70c43e152a076ca7de4226f8ac9291b7d8840741 (patch)
treef73253193669bfea5ec70a9f4cc24aeed8f9694b /src/or/connection.c
parentdd632e697e6e7e96f755fab1a618e71fef169cdc (diff)
downloadtor-70c43e152a076ca7de4226f8ac9291b7d8840741.tar
tor-70c43e152a076ca7de4226f8ac9291b7d8840741.tar.gz
note bug in assert_connection_ok
svn:r1159
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 3b1f6d963..6728ae5e3 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -840,9 +840,13 @@ void assert_connection_ok(connection_t *conn, time_t now)
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);