aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-15 16:23:43 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-15 16:23:43 -0500
commitd6634001c9063323643e3ddfe8905c250a6d60d7 (patch)
tree7efa13432f31719ec5b4446f4ed00d0d4d34cd51 /src/or/channel.c
parent5fcc5dfa779fcdc84cb7249749b7fbb782f15a10 (diff)
parent076654ce8423d2b8ab7285b22c13d4002942bd8b (diff)
downloadtor-d6634001c9063323643e3ddfe8905c250a6d60d7.tar
tor-d6634001c9063323643e3ddfe8905c250a6d60d7.tar.gz
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.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 104b018cf..f8afc405e 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();