diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-11-23 18:14:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-11-23 18:14:19 +0000 |
commit | 1155ae9b0344ec27f900afd2e4c9da60e91bb492 (patch) | |
tree | ecea6b9976cf66ccb78181bf802f1f0578be7c38 | |
parent | 5e9ba094bca17f600fc5747701017c95ecb26189 (diff) | |
download | tor-1155ae9b0344ec27f900afd2e4c9da60e91bb492.tar tor-1155ae9b0344ec27f900afd2e4c9da60e91bb492.tar.gz |
Bring assert_connection_ok up to date
svn:r863
-rw-r--r-- | src/or/connection.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 022e4d67a..d8746dd17 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -717,8 +717,10 @@ void assert_connection_ok(connection_t *conn, time_t now) * marked_for_close. */ /* buffers */ - assert(conn->inbuf); - assert(conn->outbuf); + if (!connection_is_listener(conn)) { + assert(conn->inbuf); + assert(conn->outbuf); + } assert(!now || conn->timestamp_lastread <= now); assert(!now || conn->timestamp_lastwritten <= now); @@ -788,12 +790,7 @@ void assert_connection_ok(connection_t *conn, time_t now) case CONN_TYPE_AP: assert(conn->state >= _AP_CONN_STATE_MIN && conn->state <= _AP_CONN_STATE_MAX); - if (conn->state == AP_CONN_STATE_SOCKS_WAIT || - conn->state == AP_CONN_STATE_CIRCUIT_WAIT) { - assert(conn->socks_request); - } else { - assert(!conn->socks_request); - } + assert(conn->socks_request); break; case CONN_TYPE_DIR: assert(conn->state >= _DIR_CONN_STATE_MIN && |