Commit 32506ad2 authored by Nick Mathewson's avatar Nick Mathewson 🏃
Browse files

svn:r9930
parent 98e5d107
...@@ -158,9 +158,11 @@ circuit_set_p_circid_orconn(or_circuit_t *circ, uint16_t id, ...@@ -158,9 +158,11 @@ circuit_set_p_circid_orconn(or_circuit_t *circ, uint16_t id,
or_connection_t *conn) or_connection_t *conn)
{ {
int active; int active;
int active;
active = circ->p_conn_cells.n > 0; active = circ->p_conn_cells.n > 0;
tor_assert(bool_eq(active, circ->next_active_on_p_conn)); tor_assert(bool_eq(active, circ->next_active_on_p_conn));
active = circ->p_conn_cells.n > 0;
circuit_set_circid_orconn_helper(TO_CIRCUIT(circ), CELL_DIRECTION_IN, circuit_set_circid_orconn_helper(TO_CIRCUIT(circ), CELL_DIRECTION_IN,
id, conn, active); id, conn, active);
...@@ -177,9 +179,11 @@ circuit_set_n_circid_orconn(circuit_t *circ, uint16_t id, ...@@ -177,9 +179,11 @@ circuit_set_n_circid_orconn(circuit_t *circ, uint16_t id,
or_connection_t *conn) or_connection_t *conn)
{ {
int active; int active;
int active;
active = circ->n_conn_cells.n > 0; active = circ->n_conn_cells.n > 0;
tor_assert(bool_eq(active, circ->next_active_on_n_conn)); tor_assert(bool_eq(active, circ->next_active_on_n_conn));
active = circ->n_conn_cells.n > 0;
circuit_set_circid_orconn_helper(circ, CELL_DIRECTION_OUT, circuit_set_circid_orconn_helper(circ, CELL_DIRECTION_OUT,
id, conn, active); id, conn, active);
...@@ -410,6 +414,8 @@ circuit_free(circuit_t *circ) ...@@ -410,6 +414,8 @@ circuit_free(circuit_t *circ)
other->rend_splice = NULL; other->rend_splice = NULL;
} }
cell_queue_clear(&ocirc->p_conn_cells);
tor_free(circ->onionskin); tor_free(circ->onionskin);
/* remove from map. */ /* remove from map. */
...@@ -420,6 +426,8 @@ circuit_free(circuit_t *circ) ...@@ -420,6 +426,8 @@ circuit_free(circuit_t *circ)
cell_queue_clear(&ocirc->p_conn_cells); cell_queue_clear(&ocirc->p_conn_cells);
} }
cell_queue_clear(&circ->n_conn_cells);
/* Remove from map. */ /* Remove from map. */
circuit_set_n_circid_orconn(circ, 0, NULL); circuit_set_n_circid_orconn(circ, 0, NULL);
......
...@@ -792,6 +792,7 @@ int ...@@ -792,6 +792,7 @@ int
connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason) connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason)
{ {
cell_t cell; cell_t cell;
circuit_t *circ;
tor_assert(conn); tor_assert(conn);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment