Browse Source

Fix a false assertion when extending a circuit to a relay to which a connection is already established. In that case the circuit should not need to memorize extend info for that relay. circuitbuild.c:389 contains a similar assertion.

svn:r16375
Karsten Loesing 16 years ago
parent
commit
3c9cd463d2
3 changed files with 3 additions and 3 deletions
  1. 1 1
      ChangeLog
  2. 1 1
      src/or/circuitbuild.c
  3. 1 1
      src/or/or.h

+ 1 - 1
ChangeLog

@@ -33,7 +33,7 @@ Changes in version 0.2.1.3-alpha - 2008-08-03
     - Change the implementation of ExcludeNodes and ExcludeExitNodes to
       be more efficient. Formerly it was quadratic in the number of
       servers; now it should be linear. Fixes bug 509.
-    - Save 16-22 bytes per open circuit by moving the n_hop, n_port,
+    - Save 16-22 bytes per open circuit by moving the n_addr, n_port,
       and n_conn_id_digest fields into a separate structure that's
       only needed when the circuit has not yet attached to an n_conn.
 

+ 1 - 1
src/or/circuitbuild.c

@@ -791,7 +791,7 @@ circuit_extend(cell_t *cell, circuit_t *circ)
     return 0;
   }
 
-  tor_assert(circ->n_hop);
+  tor_assert(!circ->n_hop); /* Connection is already established. */
   circ->n_conn = n_conn;
   log_debug(LD_CIRC,"n_conn is %s:%u",
             n_conn->_base.address,n_conn->_base.port);

+ 1 - 1
src/or/or.h

@@ -1784,7 +1784,7 @@ typedef struct circuit_t {
   circid_t n_circ_id;
 
   /** The hop to which we want to extend this ciruit.  Should be NULL if
-   * the */
+   * the circuit has attached to a connection. */
   extend_info_t *n_hop;
 
   /** True iff we are waiting for n_conn_cells to become less full before