diff options
author | Roger Dingledine <arma@torproject.org> | 2004-02-24 22:33:30 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-02-24 22:33:30 +0000 |
commit | 7985f525ecaab537da6b9cc9f849eb6ba22ff411 (patch) | |
tree | 818e6398311d484b3d7f4f4f92f2daef576cc418 /src/or/connection.c | |
parent | 01cdffc0c26b8c9d58b822d7094149d250add3b7 (diff) | |
download | tor-7985f525ecaab537da6b9cc9f849eb6ba22ff411.tar.gz tor-7985f525ecaab537da6b9cc9f849eb6ba22ff411.zip |
fix some bugs in assert_connection_ok
svn:r1118
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 211152a685..2644a60e65 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -778,7 +778,7 @@ void assert_connection_ok(connection_t *conn, time_t now) if(conn->state == OR_CONN_STATE_OPEN) { assert(conn->bandwidth > 0); assert(conn->receiver_bucket >= 0); - assert(conn->receiver_bucket <= 10*conn->bandwidth); +// assert(conn->receiver_bucket <= 10*conn->bandwidth); } assert(conn->addr && conn->port); assert(conn->address); @@ -795,14 +795,11 @@ void assert_connection_ok(connection_t *conn, time_t now) assert(!conn->done_sending); assert(!conn->done_receiving); } else { - assert(!conn->next_stream || - conn->next_stream->type == CONN_TYPE_EXIT || - conn->next_stream->type == CONN_TYPE_AP); if(conn->type == CONN_TYPE_AP && conn->state == AP_CONN_STATE_OPEN) assert(conn->cpath_layer); if(conn->cpath_layer) assert_cpath_layer_ok(conn->cpath_layer); - /* XXX unchecked, package window, deliver window. */ + /* XXX unchecked: package window, deliver window. */ } if (conn->type != CONN_TYPE_AP) { assert(!conn->socks_request); @@ -835,6 +832,7 @@ void assert_connection_ok(connection_t *conn, time_t now) case CONN_TYPE_DNSWORKER: assert(conn->state == DNSWORKER_STATE_IDLE || conn->state == DNSWORKER_STATE_BUSY); + break; case CONN_TYPE_CPUWORKER: assert(conn->state >= _CPUWORKER_STATE_MIN && conn->state <= _CPUWORKER_STATE_MAX); |