From 4dddac706d5f47fcacebdd9693b974460100e8d3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 16 Sep 2003 19:51:09 +0000 Subject: Use EXIT properly in assert_connection_ok svn:r465 --- src/or/connection.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/or/connection.c b/src/or/connection.c index 76e1f6732..790d31db3 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -808,7 +808,7 @@ void assert_connection_ok(connection_t *conn, time_t now) #endif } - if (conn->type != CONN_TYPE_EXIT) { + if (conn->type != CONN_TYPE_EXIT && conn->type != CONN_TYPE_AP) { assert(!conn->stream_id[0]); assert(!conn->next_stream); assert(!conn->cpath_layer); @@ -818,7 +818,8 @@ void assert_connection_ok(connection_t *conn, time_t now) assert(!conn->done_receiving); } else { assert(!conn->next_stream || - conn->next_stream->type == CONN_TYPE_EXIT); + conn->next_stream->type == CONN_TYPE_EXIT || + conn->next_stream->type == CONN_TYPE_AP); assert(conn->cpath_layer); assert_cpath_layer_ok(conn->cpath_layer); /* XXX unchecked, package window, deliver window. */ @@ -847,7 +848,7 @@ void assert_connection_ok(connection_t *conn, time_t now) conn->state <= _EXIT_CONN_STATE_MAX); break; case CONN_TYPE_AP: - assert(conn->state >= _AP_CONN_STATE_MIN && + assert(conn->state >= _EXIT_CONN_STATE_MIN && conn->state <= _AP_CONN_STATE_MAX); break; case CONN_TYPE_DIR: -- cgit v1.2.3