summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-13 10:43:08 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-15 11:17:22 -0500
commitdc21f1f6625ba35a6888190a601efded9cfa5e5e (patch)
tree7cb94614f2881e565c1017adf26e5228ca9178cf /src
parent4bf79fa4fa99fe66f6b1ad413cbf475325803e04 (diff)
downloadtor-dc21f1f6625ba35a6888190a601efded9cfa5e5e.tar.gz
tor-dc21f1f6625ba35a6888190a601efded9cfa5e5e.zip
reset_padding_counts is only once per 24h; it can be all.
Diffstat (limited to 'src')
-rw-r--r--src/core/mainloop/mainloop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c
index 176399b333..6df51062a7 100644
--- a/src/core/mainloop/mainloop.c
+++ b/src/core/mainloop/mainloop.c
@@ -1376,9 +1376,11 @@ CALLBACK(second_elapsed);
#define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
STATIC periodic_event_item_t periodic_events[] = {
- /* Everyone needs to run those. */
+ /* Everyone needs to run these. They need to have very long timeouts for
+ * that to be safe. */
CALLBACK(add_entropy, ALL, 0),
CALLBACK(heartbeat, ALL, 0),
+ CALLBACK(reset_padding_counts, ALL, 0),
/* This is a legacy catch-all callback that runs once per second if
* we are online and active. */
@@ -1403,9 +1405,6 @@ STATIC periodic_event_item_t periodic_events[] = {
/* XXXX investigate this. ??? */
CALLBACK(write_stats_file, NET_PARTICIPANT, FL(FLUSH_ON_DISABLE)),
- /* XXXX investigate this. ???? */
- CALLBACK(reset_padding_counts, NET_PARTICIPANT, FL(FLUSH_ON_DISABLE)),
-
/* Routers (bridge and relay) only. */
CALLBACK(check_descriptor, ROUTER, FL(NEED_NET)),
CALLBACK(check_ed_keys, ROUTER, 0),