aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-09-03 02:14:31 +0000
committerNick Mathewson <nickm@torproject.org>2005-09-03 02:14:31 +0000
commitae726e659e3f52964c7edbd0a7bbe93ee3df32e4 (patch)
tree4d31c7bfa95ac54d6bcf83c89de614757c14c013 /src/or/relay.c
parent9b949cc1d2603da1675fde754debad0e48a4167a (diff)
downloadtor-ae726e659e3f52964c7edbd0a7bbe93ee3df32e4.tar.gz
tor-ae726e659e3f52964c7edbd0a7bbe93ee3df32e4.zip
and another byte counting error.
svn:r4902
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 7c90089ae2..f2a5904d77 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -779,14 +779,14 @@ connection_edge_process_relay_cell_not_open(
return 0;
}
if (rh->length >= answer_len+6)
- ttl = (int)ntohl(get_uint32(cell->payload+RELAY_HEADER_SIZE+6));
+ ttl = (int)ntohl(get_uint32(cell->payload+RELAY_HEADER_SIZE+2+answer_len));
else
ttl = -1;
connection_ap_handshake_socks_resolved(conn,
cell->payload[RELAY_HEADER_SIZE], /*answer_type*/
cell->payload[RELAY_HEADER_SIZE+1], /*answer_len*/
- cell->payload+RELAY_HEADER_SIZE+2,
- ttl); /* answer */
+ cell->payload+RELAY_HEADER_SIZE+2, /*answer*/
+ ttl);
connection_mark_unattached_ap(conn, END_STREAM_REASON_ALREADY_SOCKS_REPLIED);
return 0;
}