aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-04-09 18:44:50 +0000
committerNick Mathewson <nickm@torproject.org>2008-04-09 18:44:50 +0000
commit4901ee0a8c0efafb71b5fdaf6961ef04556ec1a4 (patch)
tree107b368dc6dd304989e2ae9653de74738915325f /src/or/connection_or.c
parent186df044cdf896131af5fba1f2e4da7a468e79ab (diff)
downloadtor-4901ee0a8c0efafb71b5fdaf6961ef04556ec1a4.tar.gz
tor-4901ee0a8c0efafb71b5fdaf6961ef04556ec1a4.zip
r19273@catbus: nickm | 2008-04-09 14:44:23 -0400
Do a slightly better fix for r14329: don't call time() quite so much. Also note the time(NULL) hack we wanted to do in the TODO. svn:r14334
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 5d9800d093..00217f2dcb 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -285,13 +285,15 @@ int
connection_or_flushed_some(or_connection_t *conn)
{
size_t datalen = buf_datalen(conn->_base.outbuf);
+ time_t now = time(NULL);
/* If we're under the low water mark, add cells until we're just over the
* high water mark. */
if (datalen < OR_CONN_LOWWATER) {
ssize_t n = (OR_CONN_HIGHWATER - datalen + CELL_NETWORK_SIZE-1)
/ CELL_NETWORK_SIZE;
while (conn->active_circuits && n > 0) {
- int flushed = connection_or_flush_from_first_active_circuit(conn, 1);
+ int flushed;
+ flushed = connection_or_flush_from_first_active_circuit(conn, 1, now);
n -= flushed;
}
}