GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit df25b88b authored by Neel Chauhan's avatar Neel Chauhan

Change the circuit state after allocating build_state

parent 67fc69c8
Pipeline #730 passed with stage
in 13 minutes and 31 seconds
o Minor bugfixes (circuit):
- In origin_circuit_init(), change the circuit state after
allocating build_state. This allows circuit_state_publish()
to run. Previously, we changed the state before allocating,
which meant circuit_state_publish() never ran. Fixes bug
31608; bugfix on 0.1.1.23. Patch by Neel Chauhan.
......@@ -450,7 +450,6 @@ origin_circuit_init(uint8_t purpose, int flags)
{
/* sets circ->p_circ_id and circ->p_chan */
origin_circuit_t *circ = origin_circuit_new();
circuit_set_state(TO_CIRCUIT(circ), CIRCUIT_STATE_CHAN_WAIT);
circ->build_state = tor_malloc_zero(sizeof(cpath_build_state_t));
circ->build_state->onehop_tunnel =
((flags & CIRCLAUNCH_ONEHOP_TUNNEL) ? 1 : 0);
......@@ -462,6 +461,7 @@ origin_circuit_init(uint8_t purpose, int flags)
((flags & CIRCLAUNCH_IS_INTERNAL) ? 1 : 0);
circ->build_state->is_ipv6_selftest =
((flags & CIRCLAUNCH_IS_IPV6_SELFTEST) ? 1 : 0);
circuit_set_state(TO_CIRCUIT(circ), CIRCUIT_STATE_CHAN_WAIT);
circ->base_.purpose = purpose;
return circ;
}
......
Markdown is supported
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