mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Use EXIT properly in assert_connection_ok
svn:r465
This commit is contained in:
parent
1b9c2f35eb
commit
4dddac706d
@ -808,7 +808,7 @@ void assert_connection_ok(connection_t *conn, time_t now)
|
|||||||
#endif
|
#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->stream_id[0]);
|
||||||
assert(!conn->next_stream);
|
assert(!conn->next_stream);
|
||||||
assert(!conn->cpath_layer);
|
assert(!conn->cpath_layer);
|
||||||
@ -818,7 +818,8 @@ void assert_connection_ok(connection_t *conn, time_t now)
|
|||||||
assert(!conn->done_receiving);
|
assert(!conn->done_receiving);
|
||||||
} else {
|
} else {
|
||||||
assert(!conn->next_stream ||
|
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(conn->cpath_layer);
|
||||||
assert_cpath_layer_ok(conn->cpath_layer);
|
assert_cpath_layer_ok(conn->cpath_layer);
|
||||||
/* XXX unchecked, package window, deliver window. */
|
/* 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);
|
conn->state <= _EXIT_CONN_STATE_MAX);
|
||||||
break;
|
break;
|
||||||
case CONN_TYPE_AP:
|
case CONN_TYPE_AP:
|
||||||
assert(conn->state >= _AP_CONN_STATE_MIN &&
|
assert(conn->state >= _EXIT_CONN_STATE_MIN &&
|
||||||
conn->state <= _AP_CONN_STATE_MAX);
|
conn->state <= _AP_CONN_STATE_MAX);
|
||||||
break;
|
break;
|
||||||
case CONN_TYPE_DIR:
|
case CONN_TYPE_DIR:
|
||||||
|
Loading…
Reference in New Issue
Block a user