aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-03-19 21:59:07 +0000
committerNick Mathewson <nickm@torproject.org>2003-03-19 21:59:07 +0000
commita528ee2d8fa6ed19d943e5a701611f7bb5f07efc (patch)
treebb01cd19f8f20ef7a540d4fa8cc416ddc4aebc1f /src
parent7f7417cd299b7f8fd7f696f34183cbd6286454cf (diff)
downloadtor-a528ee2d8fa6ed19d943e5a701611f7bb5f07efc.tar
tor-a528ee2d8fa6ed19d943e5a701611f7bb5f07efc.tar.gz
Be clear about whether we are using half-open connections
svn:r204
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_ap.c2
-rw-r--r--src/or/connection_exit.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c
index 7df901a61..0faba3895 100644
--- a/src/or/connection_ap.c
+++ b/src/or/connection_ap.c
@@ -450,7 +450,7 @@ int connection_ap_process_data_cell(cell_t *cell, circuit_t *circ) {
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)
diff --git a/src/or/connection_exit.c b/src/or/connection_exit.c
index c5dc3a1c0..75096213a 100644
--- a/src/or/connection_exit.c
+++ b/src/or/connection_exit.c
@@ -11,7 +11,7 @@ int connection_exit_process_inbuf(connection_t *conn) {
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 @@ int connection_exit_finished_flushing(connection_t *conn) {
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 @@ int connection_exit_process_data_cell(cell_t *cell, circuit_t *circ) {
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)