summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-02-15 20:19:53 -0500
committerNick Mathewson <nickm@torproject.org>2018-02-15 20:19:53 -0500
commit3d7bf98d13ffc090e5ba1b918f53668018690dce (patch)
tree82908c4a835bc9559996fe068466441e5dc78112 /src/or/connection.c
parent3c8a481599cf9c84530db1f304731b5f2ec9caef (diff)
parent7884ce76e100abc220ddedb76c9b98d22d66d645 (diff)
downloadtor-3d7bf98d13ffc090e5ba1b918f53668018690dce.tar.gz
tor-3d7bf98d13ffc090e5ba1b918f53668018690dce.zip
Merge remote-tracking branch 'valentecaio/t-24714'
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index a05c9fc627..b113bee495 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -462,8 +462,8 @@ connection_init(time_t now, connection_t *conn, int type, int socket_family)
}
conn->timestamp_created = now;
- conn->timestamp_lastread = now;
- conn->timestamp_lastwritten = now;
+ conn->timestamp_last_read_allowed = now;
+ conn->timestamp_last_write_allowed = now;
}
/** Create a link between <b>conn_a</b> and <b>conn_b</b>. */
@@ -861,7 +861,7 @@ connection_mark_for_close_internal_, (connection_t *conn,
/* in case we're going to be held-open-til-flushed, reset
* the number of seconds since last successful write, so
* we get our whole 15 seconds */
- conn->timestamp_lastwritten = time(NULL);
+ conn->timestamp_last_write_allowed = time(NULL);
}
/** Find each connection that has hold_open_until_flushed set to
@@ -883,7 +883,7 @@ connection_expire_held_open(void)
*/
if (conn->hold_open_until_flushed) {
tor_assert(conn->marked_for_close);
- if (now - conn->timestamp_lastwritten >= 15) {
+ if (now - conn->timestamp_last_write_allowed >= 15) {
int severity;
if (conn->type == CONN_TYPE_EXIT ||
(conn->type == CONN_TYPE_DIR &&
@@ -3417,7 +3417,7 @@ connection_handle_read_impl(connection_t *conn)
if (conn->marked_for_close)
return 0; /* do nothing */
- conn->timestamp_lastread = approx_time();
+ conn->timestamp_last_read_allowed = approx_time();
switch (conn->type) {
case CONN_TYPE_OR_LISTENER:
@@ -3818,7 +3818,7 @@ update_send_buffer_size(tor_socket_t sock)
* when libevent tells us that conn wants to write, or below
* from connection_buf_add() when an entire TLS record is ready.
*
- * Update <b>conn</b>-\>timestamp_lastwritten to now, and call flush_buf
+ * Update <b>conn</b>-\>timestamp_last_write_allowed to now, and call flush_buf
* or flush_buf_tls appropriately. If it succeeds and there are no more
* more bytes on <b>conn</b>-\>outbuf, then call connection_finished_flushing
* on it too.
@@ -3851,7 +3851,7 @@ connection_handle_write_impl(connection_t *conn, int force)
return 0;
}
- conn->timestamp_lastwritten = now;
+ conn->timestamp_last_write_allowed = now;
/* Sometimes, "writable" means "connected". */
if (connection_state_is_connecting(conn)) {