diff options
author | Roger Dingledine <arma@torproject.org> | 2002-07-18 23:44:57 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2002-07-18 23:44:57 +0000 |
commit | 2147898577cdf1664ffbf16f48067c18a841593d (patch) | |
tree | c37968ca751bb1721ac68a3cd6adaac13b68ee68 /src/or/circuit.c | |
parent | 0a8d58138df722194517ac65abe6716bf404df3b (diff) | |
download | tor-2147898577cdf1664ffbf16f48067c18a841593d.tar.gz tor-2147898577cdf1664ffbf16f48067c18a841593d.zip |
Implemented router twins
I modified new_route so we don't pick twins back-to-back in the path.
I also had to patch my previous uses of connection_twin_get_by_addr_port()
because they assumed that "addr" and "port" would be the same for a twin
as for the original router.
svn:r56
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r-- | src/or/circuit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index c2c91338ca..2758c13d21 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -287,14 +287,14 @@ int circuit_crypt(circuit_t *circ, char *in, size_t inlen, char crypt_type) { return -1; if(crypt_type == 'e') { - log(LOG_DEBUG,"circuit_crypt(): Encrypting %d bytes.",inlen); +// log(LOG_DEBUG,"circuit_crypt(): Encrypting %d bytes.",inlen); if(circ->cpath) { /* we're at the beginning of the circuit. We'll want to do layered crypts. */ /* 'e' means we're preparing to send it out. */ for (i=0; i < circ->cpathlen; i++) /* moving from last to first hop * Remember : cpath is in reverse order, i.e. last hop first */ { - log(LOG_DEBUG,"circuit_crypt() : Encrypting via cpath: Processing hop %u",circ->cpathlen-i); +// log(LOG_DEBUG,"circuit_crypt() : Encrypting via cpath: Processing hop %u",circ->cpathlen-i); thishop = circ->cpath[i]; /* encrypt */ @@ -317,13 +317,13 @@ int circuit_crypt(circuit_t *circ, char *in, size_t inlen, char crypt_type) { memcpy(in,out,inlen); } } else if(crypt_type == 'd') { - log(LOG_DEBUG,"circuit_crypt(): Decrypting %d bytes.",inlen); +// log(LOG_DEBUG,"circuit_crypt(): Decrypting %d bytes.",inlen); if(circ->cpath) { /* we're at the beginning of the circuit. We'll want to do layered crypts. */ for (i=circ->cpathlen-1; i >= 0; i--) /* moving from first to last hop * Remember : cpath is in reverse order, i.e. last hop first */ { - log(LOG_DEBUG,"circuit_crypt() : Decrypting via cpath: Processing hop %u",circ->cpathlen-i); +// log(LOG_DEBUG,"circuit_crypt() : Decrypting via cpath: Processing hop %u",circ->cpathlen-i); thishop = circ->cpath[i]; /* encrypt */ |