mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-03 00:53:32 +01:00
Allow n_chan to be NULL in circuitmux_find_map_entry(); it can be but with non-NULL p_chan when extending a circuit
This commit is contained in:
parent
a0200c1f6e
commit
903cc8acd1
@ -655,8 +655,9 @@ circuitmux_find_map_entry(circuitmux_t *cmux, circuit_t *circ)
|
|||||||
tor_assert(cmux);
|
tor_assert(cmux);
|
||||||
tor_assert(cmux->chanid_circid_map);
|
tor_assert(cmux->chanid_circid_map);
|
||||||
tor_assert(circ);
|
tor_assert(circ);
|
||||||
tor_assert(circ->n_chan);
|
|
||||||
|
|
||||||
|
/* Check if we have n_chan */
|
||||||
|
if (circ->n_chan) {
|
||||||
/* Okay, let's see if it's attached for n_chan/n_circ_id */
|
/* Okay, let's see if it's attached for n_chan/n_circ_id */
|
||||||
search.chan_id = circ->n_chan->global_identifier;
|
search.chan_id = circ->n_chan->global_identifier;
|
||||||
search.circ_id = circ->n_circ_id;
|
search.circ_id = circ->n_circ_id;
|
||||||
@ -664,6 +665,7 @@ circuitmux_find_map_entry(circuitmux_t *cmux, circuit_t *circ)
|
|||||||
/* Query */
|
/* Query */
|
||||||
hashent = HT_FIND(chanid_circid_muxinfo_map, cmux->chanid_circid_map,
|
hashent = HT_FIND(chanid_circid_muxinfo_map, cmux->chanid_circid_map,
|
||||||
&search);
|
&search);
|
||||||
|
}
|
||||||
|
|
||||||
/* Found something? */
|
/* Found something? */
|
||||||
if (hashent) {
|
if (hashent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user