mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Use channel_is_client() accessor in channelpadding.c.
Also, allow channel_is_client() to take a const channel.
This commit is contained in:
parent
d1e0e486e9
commit
ceb49c1c5f
@ -4075,7 +4075,7 @@ channel_mark_bad_for_new_circs(channel_t *chan)
|
||||
*/
|
||||
|
||||
int
|
||||
channel_is_client(channel_t *chan)
|
||||
channel_is_client(const channel_t *chan)
|
||||
{
|
||||
tor_assert(chan);
|
||||
|
||||
|
@ -666,7 +666,7 @@ int channel_is_bad_for_new_circs(channel_t *chan);
|
||||
void channel_mark_bad_for_new_circs(channel_t *chan);
|
||||
int channel_is_canonical(channel_t *chan);
|
||||
int channel_is_canonical_is_reliable(channel_t *chan);
|
||||
int channel_is_client(channel_t *chan);
|
||||
int channel_is_client(const channel_t *chan);
|
||||
int channel_is_local(channel_t *chan);
|
||||
int channel_is_incoming(channel_t *chan);
|
||||
int channel_is_outgoing(channel_t *chan);
|
||||
|
@ -66,7 +66,7 @@ static int consensus_nf_pad_relays;
|
||||
* its a client, use that. Then finally verify in the consensus).
|
||||
*/
|
||||
#define CHANNEL_IS_CLIENT(chan, options) \
|
||||
(!public_server_mode((options)) || (chan)->is_client || \
|
||||
(!public_server_mode((options)) || channel_is_client(chan) || \
|
||||
!connection_or_digest_is_known_relay((chan)->identity_digest))
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user