[or-cvs] Be clear about whether we are using half-open connections

Nick Mathewson nickm at seul.org
Wed Mar 19 21:59:09 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv32172/src/or

Modified Files:
	connection_ap.c connection_exit.c 
Log Message:
Be clear about whether we are using half-open connections

Index: connection_ap.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_ap.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- connection_ap.c	19 Mar 2003 20:48:56 -0000	1.29
+++ connection_ap.c	19 Mar 2003 21:59:07 -0000	1.30
@@ -450,7 +450,7 @@
       for(prevconn = circ->p_conn; prevconn->next_topic != conn; prevconn = prevconn->next_topic) ;
       prevconn->next_topic = conn->next_topic;
 #endif
-#if 0
+#ifdef HALF_OPEN
       conn->done_sending = 1;
       shutdown(conn->s, 1); /* XXX check return; refactor NM */
       if (conn->done_receiving)

Index: connection_exit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_exit.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- connection_exit.c	19 Mar 2003 20:48:56 -0000	1.23
+++ connection_exit.c	19 Mar 2003 21:59:07 -0000	1.24
@@ -11,7 +11,7 @@
   assert(conn && conn->type == CONN_TYPE_EXIT);
 
   if(conn->inbuf_reached_eof) {
-#if 1
+#ifdef HALF_OPEN
     /* XXX!!! If this is right, duplicate it in connection_ap.c */
 
     /* eof reached; we're done reading, but we might want to write more. */ 
@@ -94,7 +94,7 @@
       connection_stop_writing(conn);
 #ifdef USE_ZLIB
       if (connection_decompress_to_buf(NULL, 0, conn, Z_SYNC_FLUSH) < 0)
-        return 0;
+        return -1;
 #endif
       connection_consider_sending_sendme(conn, EDGE_EXIT);
       return 0;
@@ -285,7 +285,7 @@
       for(prevconn = circ->n_conn; prevconn->next_topic != conn; prevconn = prevconn->next_topic) ;
       prevconn->next_topic = conn->next_topic;
 #endif
-#if 0
+#ifdef HALF_OPEN
       conn->done_sending = 1;
       shutdown(conn->s, 1); /* XXX check return; refactor NM */
       if (conn->done_receiving)



More information about the tor-commits mailing list