mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
relay/circuitbuild: Refactor circuit_extend()
Make the "else" case explicit at the end of the function. Part of 33633.
This commit is contained in:
parent
6d75f3244f
commit
d79e5d52bc
@ -295,9 +295,10 @@ circuit_extend(struct cell_t *cell, struct circuit_t *circ)
|
|||||||
* OR_CONN_STATE_OPEN.
|
* OR_CONN_STATE_OPEN.
|
||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else {
|
||||||
|
/* Connection is already established.
|
||||||
tor_assert(!circ->n_hop); /* Connection is already established. */
|
* So we need to extend the circuit to the next hop. */
|
||||||
|
tor_assert(!circ->n_hop);
|
||||||
circ->n_chan = n_chan;
|
circ->n_chan = n_chan;
|
||||||
log_debug(LD_CIRC,
|
log_debug(LD_CIRC,
|
||||||
"n_chan is %s.",
|
"n_chan is %s.",
|
||||||
@ -307,6 +308,7 @@ circuit_extend(struct cell_t *cell, struct circuit_t *circ)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** On a relay, accept a create cell, initialise a circuit, and send a
|
/** On a relay, accept a create cell, initialise a circuit, and send a
|
||||||
|
Loading…
Reference in New Issue
Block a user