aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-11-11 04:13:37 +0000
committerRoger Dingledine <arma@torproject.org>2003-11-11 04:13:37 +0000
commit84884a79c0fbe6edf2056643091b2a90d2dd69e7 (patch)
tree06627c41a6b0b2d257e9d03e4556c149ca3bfe70 /src
parent2a3479af5f995a23e8d6830ac60aa8bed19dfaed (diff)
downloadtor-84884a79c0fbe6edf2056643091b2a90d2dd69e7.tar
tor-84884a79c0fbe6edf2056643091b2a90d2dd69e7.tar.gz
conn->socks_version is obsolete
svn:r787
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_edge.c6
-rw-r--r--src/or/or.h1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index b563844b6..c92ab1fbf 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -528,7 +528,6 @@ static int connection_ap_handshake_process_socks(connection_t *conn) {
log_fn(LOG_DEBUG,"entered.");
sockshere = fetch_from_buf_socks(conn->inbuf, socks);
- conn->socks_version = socks->socks_version;
if(sockshere == -1 || sockshere == 0) {
if(socks->replylen) { /* we should send reply back */
log_fn(LOG_DEBUG,"reply is already set for us. Using it.");
@@ -638,7 +637,8 @@ static int connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
connection_write_to_buf(reply, replylen, conn);
return flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen); /* try to flush it */
}
- if(conn->socks_version == 4) {
+ assert(conn->socks_request);
+ if(conn->socks_request->socks_version == 4) {
memset(buf,0,SOCKS4_NETWORK_LEN);
#define SOCKS4_GRANTED 90
#define SOCKS4_REJECT 91
@@ -647,7 +647,7 @@ static int connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
connection_write_to_buf(buf, SOCKS4_NETWORK_LEN, conn);
return flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen); /* try to flush it */
}
- if(conn->socks_version == 5) {
+ if(conn->socks_request->socks_version == 5) {
buf[0] = 5; /* version 5 */
#define SOCKS5_SUCCESS 0
#define SOCKS5_GENERIC_ERROR 1
diff --git a/src/or/or.h b/src/or/or.h
index 8459be226..65285a191 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -317,7 +317,6 @@ struct connection_t {
and check in circuit_about_to_close_connection() */
/* Used only by AP connections */
- char socks_version;
socks_request_t *socks_request;
};