aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-14 16:46:49 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-14 16:46:49 +0000
commit4a74812c70b75df8938de00c9efb0fabaf699300 (patch)
tree97448d2c4bfaebebd1bcda64746fd249bbb9d8d2 /src/or/connection.c
parent9e7e9e1bfefc6e3bac02cd230fcad48272ba4109 (diff)
downloadtor-4a74812c70b75df8938de00c9efb0fabaf699300.tar
tor-4a74812c70b75df8938de00c9efb0fabaf699300.tar.gz
r11812@catbus: nickm | 2007-02-14 11:22:08 -0500
Apply stream_bw patch from Robert Hogan. svn:r9585
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index a8853ef48..7d31e3f95 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1571,6 +1571,13 @@ connection_read_to_buf(connection_t *conn, int *max_to_read)
*max_to_read = at_most - n_read;
}
+ if (CONN_IS_EDGE(conn)) {
+ if (conn->type == CONN_TYPE_AP) {
+ edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
+ edge_conn->n_read += n_read;
+ }
+ }
+
if (connection_is_rate_limited(conn)) {
/* For non-local IPs, remember if we flushed any bytes over the wire. */
time_t now = time(NULL);
@@ -1767,6 +1774,13 @@ connection_handle_write(connection_t *conn, int force)
n_written = (size_t) result;
}
+ if (CONN_IS_EDGE(conn)) {
+ if (conn->type == CONN_TYPE_AP) {
+ edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
+ edge_conn->n_written += n_written;
+ }
+ }
+
if (connection_is_rate_limited(conn)) {
/* For non-local IPs, remember if we flushed any bytes over the wire. */
time_t now = time(NULL);