circuit_unlink_all_from_channel() is brain-damaged
View options
- Truncate descriptions
The circuit_unlink_all_from_channel() function calls channel_unlink_all_circuits() and then circuit_mark_for_close() on each circuit in a loop. The channel_unlink_all_circuits() call resets the channel's num_n_circuits and num_p_circutis to 0, and then they get decremented, which causes them to wrap back below 0, and in the case of spliced rendezvous circuits the circuit_mark_for_close() after detachment from the cmux in channel_unlink_all-circuits() can lead to a spurious circuit_clear_cell_queue() with no cmux to update on. This function should be rewritten to be less stupid.
- Show labels
- Show closed items