]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix comments that implied that only dir connections had a purpose field, and the...
authorNick Mathewson <nickm@torproject.org>
Thu, 27 Jul 2006 04:10:51 +0000 (04:10 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 27 Jul 2006 04:10:51 +0000 (04:10 +0000)
svn:r6918

src/or/connection.c
src/or/or.h

index 6528e2b4f2b6f4d721e8aa5102845b9926e0096a..48ceb2623dd1afd4d9123cb2058fe26793d77f9c 100644 (file)
@@ -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)
index f3dc9e4b7bf37bc0fbe0923c999bd93967a461ea..8624214e9fab826a11275178d8abf1cfb7d37915 100644 (file)
@@ -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