aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-09-16 19:51:09 +0000
committerNick Mathewson <nickm@torproject.org>2003-09-16 19:51:09 +0000
commit4dddac706d5f47fcacebdd9693b974460100e8d3 (patch)
tree30cbac96fc53bbfef4f92e276d33e6e418b5df51 /src
parent1b9c2f35eb1638d38f129c47e1dffbc0420f0ca9 (diff)
downloadtor-4dddac706d5f47fcacebdd9693b974460100e8d3.tar
tor-4dddac706d5f47fcacebdd9693b974460100e8d3.tar.gz
Use EXIT properly in assert_connection_ok
svn:r465
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c7
1 files changed, 4 insertions, 3 deletions
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: