[or-cvs] make httpsproxy more likely to work

Roger Dingledine arma at seul.org
Tue Mar 22 23:57:21 UTC 2005


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

Modified Files:
	connection.c 
Log Message:
make httpsproxy more likely to work
(don't let OR conns do tls until they've finished connecting and
doing the proxy dance.)


Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.338
retrieving revision 1.339
diff -u -d -r1.338 -r1.339
--- connection.c	17 Mar 2005 12:38:36 -0000	1.338
+++ connection.c	22 Mar 2005 23:57:18 -0000	1.339
@@ -960,7 +960,7 @@
     at_most = connection_bucket_read_limit(conn);
   }
 
-  if (connection_speaks_cells(conn) && conn->state != OR_CONN_STATE_CONNECTING) {
+  if (connection_speaks_cells(conn) && conn->state > OR_CONN_STATE_PROXY_READING) {
     int pending;
     if (conn->state == OR_CONN_STATE_HANDSHAKING) {
       /* continue handshaking even if global token bucket is empty */
@@ -1108,7 +1108,7 @@
       return -1;
   }
 
-  if (connection_speaks_cells(conn)) {
+  if (connection_speaks_cells(conn) && conn->state > OR_CONN_STATE_PROXY_READING) {
     if (conn->state == OR_CONN_STATE_HANDSHAKING) {
       connection_stop_writing(conn);
       if (connection_tls_continue_handshake(conn) < 0) {



More information about the tor-commits mailing list