summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorCaio Valente <valentecaio95@gmail.com>2018-02-01 03:12:38 +0100
committerCaio Valente <valentecaio95@gmail.com>2018-02-01 03:12:38 +0100
commit7884ce76e100abc220ddedb76c9b98d22d66d645 (patch)
tree43edbc147e262103c818f1267f9257208536623a /src/or/connection_edge.c
parent2294e330bde259f6b575f301258783ce2947bdc0 (diff)
downloadtor-7884ce76e100abc220ddedb76c9b98d22d66d645.tar.gz
tor-7884ce76e100abc220ddedb76c9b98d22d66d645.zip
refactor: rename connection_t struct fields.
connection_t.timestamp_lastwritten renamed to connection_t.timestamp_last_write_allowed connection_t.timestamp_lastread renamed to connection_t.timestamp_last_read_allowed Closes ticket 24714.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index a47f044e08..948c8722bf 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -739,7 +739,7 @@ connection_ap_expire_beginning(void)
/* if it's an internal linked connection, don't yell its status. */
severity = (tor_addr_is_null(&base_conn->addr) && !base_conn->port)
? LOG_INFO : LOG_NOTICE;
- seconds_idle = (int)( now - base_conn->timestamp_lastread );
+ seconds_idle = (int)( now - base_conn->timestamp_last_read_allowed );
seconds_since_born = (int)( now - base_conn->timestamp_created );
if (base_conn->state == AP_CONN_STATE_OPEN)
@@ -825,7 +825,7 @@ connection_ap_expire_beginning(void)
mark_circuit_unusable_for_new_conns(TO_ORIGIN_CIRCUIT(circ));
/* give our stream another 'cutoff' seconds to try */
- conn->base_.timestamp_lastread += cutoff;
+ conn->base_.timestamp_last_read_allowed += cutoff;
if (entry_conn->num_socks_retries < 250) /* avoid overflow */
entry_conn->num_socks_retries++;
/* move it back into 'pending' state, and try to attach. */
@@ -1135,7 +1135,7 @@ connection_ap_detach_retriable(entry_connection_t *conn,
int reason)
{
control_event_stream_status(conn, STREAM_EVENT_FAILED_RETRIABLE, reason);
- ENTRY_TO_CONN(conn)->timestamp_lastread = time(NULL);
+ ENTRY_TO_CONN(conn)->timestamp_last_read_allowed = time(NULL);
/* Roll back path bias use state so that we probe the circuit
* if nothing else succeeds on it */