[or-cvs] conn->socks_version is obsolete

Roger Dingledine arma at seul.org
Tue Nov 11 04:13:39 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection_edge.c or.h 
Log Message:
conn->socks_version is obsolete


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- connection_edge.c	11 Nov 2003 04:09:34 -0000	1.48
+++ connection_edge.c	11 Nov 2003 04:13:37 -0000	1.49
@@ -528,7 +528,6 @@
   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 @@
     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 @@
     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

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- or.h	11 Nov 2003 03:01:48 -0000	1.177
+++ or.h	11 Nov 2003 04:13:37 -0000	1.178
@@ -317,7 +317,6 @@
                         and check in circuit_about_to_close_connection() */
   
   /* Used only by AP connections */
-  char socks_version;
   socks_request_t *socks_request;
 };
 



More information about the tor-commits mailing list