summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-21 10:14:57 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-21 10:14:57 +0000
commit310a8da0d2ef457a245843268677f50c6ea84a98 (patch)
treebc735fce476d9c687c9aa19bdfd93963fbad874c /src/or/connection_or.c
parent671d84dc2f02d8d39f66582add2324ecb2590728 (diff)
downloadtor-310a8da0d2ef457a245843268677f50c6ea84a98.tar.gz
tor-310a8da0d2ef457a245843268677f50c6ea84a98.zip
break reached_eof() out of process_inbuf()
svn:r2930
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 273867e054..73b635d593 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -40,6 +40,12 @@ static void cell_unpack(cell_t *dest, const char *src) {
memcpy(dest->payload, src+3, CELL_PAYLOAD_SIZE);
}
+int connection_or_reached_eof(connection_t *conn) {
+ log_fn(LOG_INFO,"OR connection reached EOF. Closing.");
+ connection_mark_for_close(conn);
+ return 0;
+}
+
/** Handle any new bytes that have come in on connection <b>conn</b>.
* If conn is in 'open' state, hand it to
* connection_or_process_cells_from_inbuf()
@@ -50,12 +56,6 @@ int connection_or_process_inbuf(connection_t *conn) {
tor_assert(conn);
tor_assert(conn->type == CONN_TYPE_OR);
- if(conn->inbuf_reached_eof) {
- log_fn(LOG_INFO,"OR connection reached EOF. Closing.");
- connection_mark_for_close(conn);
- return 0;
- }
-
if(conn->state != OR_CONN_STATE_OPEN)
return 0; /* don't do anything */
return connection_or_process_cells_from_inbuf(conn);