mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix comments that implied that only dir connections had a purpose field, and the code that believed in those comments.
svn:r6918
This commit is contained in:
parent
f77b2a0407
commit
dd779d99ea
@ -2235,9 +2235,9 @@ assert_connection_ok(connection_t *conn, time_t now)
|
||||
tor_assert(conn->purpose == EXIT_PURPOSE_CONNECT ||
|
||||
conn->purpose == EXIT_PURPOSE_RESOLVE);
|
||||
}
|
||||
}
|
||||
if (conn->type != CONN_TYPE_DIR) {
|
||||
tor_assert(!conn->purpose); /* only used for dir types currently */
|
||||
} else if (conn->type != CONN_TYPE_DIR) {
|
||||
/* Purpose is only used for dir and exit types currently */
|
||||
tor_assert(!conn->purpose);
|
||||
}
|
||||
|
||||
switch (conn->type)
|
||||
|
@ -605,7 +605,7 @@ struct connection_t {
|
||||
|
||||
uint8_t type; /**< What kind of connection is this? */
|
||||
uint8_t state; /**< Current state of this connection. */
|
||||
uint8_t purpose; /**< Only used for DIR types currently. */
|
||||
uint8_t purpose; /**< Only used for DIR and EXIT types currently. */
|
||||
unsigned wants_to_read:1; /**< Boolean: should we start reading again once
|
||||
* the bandwidth throttler allows it? */
|
||||
unsigned wants_to_write:1; /**< Boolean: should we start writing again once
|
||||
|
Loading…
Reference in New Issue
Block a user