From 1155ae9b0344ec27f900afd2e4c9da60e91bb492 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 23 Nov 2003 18:14:19 +0000 Subject: Bring assert_connection_ok up to date svn:r863 --- src/or/connection.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/or/connection.c b/src/or/connection.c index 022e4d67a3..d8746dd17e 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 && -- cgit v1.2.3-54-g00ecf