diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-27 04:10:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-27 04:10:51 +0000 |
commit | dd779d99ea041789a58d921cc8b1b86cbc49cceb (patch) | |
tree | 901c66e74a4bcca6d976325aea060b12e6d5f5f3 /src | |
parent | f77b2a0407b8c312194c2c708c23ca0b32eabf8f (diff) | |
download | tor-dd779d99ea041789a58d921cc8b1b86cbc49cceb.tar.gz tor-dd779d99ea041789a58d921cc8b1b86cbc49cceb.zip |
Fix comments that implied that only dir connections had a purpose field, and the code that believed in those comments.
svn:r6918
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection.c | 6 | ||||
-rw-r--r-- | src/or/or.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 6528e2b4f2..48ceb2623d 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -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) diff --git a/src/or/or.h b/src/or/or.h index f3dc9e4b7b..8624214e9f 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 |