Browse Source

fix a seg fault when you try to launch a circ

svn:r2002
Roger Dingledine 21 years ago
parent
commit
198e5f4c16
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/or/circuitlist.c

+ 2 - 2
src/or/circuitlist.c

@@ -452,10 +452,10 @@ void assert_circuit_ok(const circuit_t *c)
   tor_assert(c->purpose >= _CIRCUIT_PURPOSE_MIN &&
   tor_assert(c->purpose >= _CIRCUIT_PURPOSE_MIN &&
              c->purpose <= _CIRCUIT_PURPOSE_MAX);
              c->purpose <= _CIRCUIT_PURPOSE_MAX);
 
 
-  if (c->n_conn)
+  if (c->n_conn) {
     tor_assert(c->n_conn->type == CONN_TYPE_OR);
     tor_assert(c->n_conn->type == CONN_TYPE_OR);
-    /* XXX008 have to memcpy id_digest when we attach n_conn */
     tor_assert(!memcmp(c->n_conn->identity_digest, c->n_conn_id_digest, DIGEST_LEN));
     tor_assert(!memcmp(c->n_conn->identity_digest, c->n_conn_id_digest, DIGEST_LEN));
+  }
   if (c->p_conn)
   if (c->p_conn)
     tor_assert(c->p_conn->type == CONN_TYPE_OR);
     tor_assert(c->p_conn->type == CONN_TYPE_OR);
   for (conn = c->p_streams; conn; conn = conn->next_stream)
   for (conn = c->p_streams; conn; conn = conn->next_stream)