diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-15 16:23:43 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-15 16:23:43 -0500 |
commit | d6634001c9063323643e3ddfe8905c250a6d60d7 (patch) | |
tree | 7efa13432f31719ec5b4446f4ed00d0d4d34cd51 /src/or/channel.c | |
parent | 5fcc5dfa779fcdc84cb7249749b7fbb782f15a10 (diff) | |
parent | 076654ce8423d2b8ab7285b22c13d4002942bd8b (diff) | |
download | tor-d6634001c9063323643e3ddfe8905c250a6d60d7.tar.gz tor-d6634001c9063323643e3ddfe8905c250a6d60d7.zip |
Merge remote-tracking branch 'public/wide_circ_ids'
Conflicts:
src/or/channel.h
src/or/connection_or.c
src/or/cpuworker.c
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 104b018cf4..f8afc405e6 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -4068,9 +4068,10 @@ channel_num_circuits(channel_t *chan) * This is called when setting up a channel and replaces the old * connection_or_set_circid_type() */ - void -channel_set_circid_type(channel_t *chan, crypto_pk_t *identity_rcvd) +channel_set_circid_type(channel_t *chan, + crypto_pk_t *identity_rcvd, + int consider_identity) { int started_here; crypto_pk_t *our_identity; @@ -4078,6 +4079,15 @@ channel_set_circid_type(channel_t *chan, crypto_pk_t *identity_rcvd) tor_assert(chan); started_here = channel_is_outgoing(chan); + + if (! consider_identity) { + if (started_here) + chan->circ_id_type = CIRC_ID_TYPE_HIGHER; + else + chan->circ_id_type = CIRC_ID_TYPE_LOWER; + return; + } + our_identity = started_here ? get_tlsclient_identity_key() : get_server_identity_key(); |